mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-19 22:45:40 +00:00
* Companion for #11981 * rename * Event to RuntimeEvent in imports * missed rename * undo * revert * rename type Call & Event * commit * ... * fix * fix errors * fixes * fmt * fix imports * final fix? * fmt * fix? * fixes after merge * small fix * cargo update -p polkadot-runtime-common * cargo +nightly fmt * update lockfile for {"polkadot", "substrate"} * fix Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+473
-481
File diff suppressed because it is too large
Load Diff
@@ -44,9 +44,9 @@ macro_rules! whitelist {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn assert_last_event<T: Config>(generic_event: <T as Config>::Event) {
|
fn assert_last_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) {
|
||||||
let events = frame_system::Pallet::<T>::events();
|
let events = frame_system::Pallet::<T>::events();
|
||||||
let system_event: <T as frame_system::Config>::Event = generic_event.into();
|
let system_event: <T as frame_system::Config>::RuntimeEvent = generic_event.into();
|
||||||
// compare to the last event record
|
// compare to the last event record
|
||||||
let EventRecord { event, .. } = &events[events.len() - 1];
|
let EventRecord { event, .. } = &events[events.len() - 1];
|
||||||
assert_eq!(event, &system_event);
|
assert_eq!(event, &system_event);
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ pub mod pallet {
|
|||||||
#[pallet::config]
|
#[pallet::config]
|
||||||
pub trait Config: frame_system::Config {
|
pub trait Config: frame_system::Config {
|
||||||
/// Overarching event type.
|
/// Overarching event type.
|
||||||
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
|
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||||
|
|
||||||
/// The currency mechanism.
|
/// The currency mechanism.
|
||||||
type Currency: ReservableCurrency<Self::AccountId>;
|
type Currency: ReservableCurrency<Self::AccountId>;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ impl system::Config for Test {
|
|||||||
type BlockLength = ();
|
type BlockLength = ();
|
||||||
type DbWeight = ();
|
type DbWeight = ();
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Index = u64;
|
type Index = u64;
|
||||||
type BlockNumber = u64;
|
type BlockNumber = u64;
|
||||||
type Hash = H256;
|
type Hash = H256;
|
||||||
@@ -68,7 +68,7 @@ impl system::Config for Test {
|
|||||||
type AccountId = u64;
|
type AccountId = u64;
|
||||||
type Lookup = IdentityLookup<Self::AccountId>;
|
type Lookup = IdentityLookup<Self::AccountId>;
|
||||||
type Header = Header;
|
type Header = Header;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
type PalletInfo = PalletInfo;
|
type PalletInfo = PalletInfo;
|
||||||
@@ -88,7 +88,7 @@ parameter_types! {
|
|||||||
|
|
||||||
impl pallet_balances::Config for Test {
|
impl pallet_balances::Config for Test {
|
||||||
type Balance = u64;
|
type Balance = u64;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ExistentialDeposit;
|
type ExistentialDeposit = ExistentialDeposit;
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
@@ -171,7 +171,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_session::Config for Test {
|
impl pallet_session::Config for Test {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
||||||
// we don't have stash and controller, thus we don't need the convert as well.
|
// we don't have stash and controller, thus we don't need the convert as well.
|
||||||
type ValidatorIdOf = IdentityCollator;
|
type ValidatorIdOf = IdentityCollator;
|
||||||
@@ -207,7 +207,7 @@ impl ValidatorRegistration<u64> for IsRegistered {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Config for Test {
|
impl Config for Test {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UpdateOrigin = EnsureSignedBy<RootAccount, u64>;
|
type UpdateOrigin = EnsureSignedBy<RootAccount, u64>;
|
||||||
type PotId = PotId;
|
type PotId = PotId;
|
||||||
|
|||||||
@@ -84,9 +84,9 @@ pub mod pallet {
|
|||||||
#[pallet::config]
|
#[pallet::config]
|
||||||
pub trait Config: frame_system::Config {
|
pub trait Config: frame_system::Config {
|
||||||
/// The overarching event type.
|
/// The overarching event type.
|
||||||
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
|
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||||
|
|
||||||
type XcmExecutor: ExecuteXcm<Self::Call>;
|
type XcmExecutor: ExecuteXcm<Self::RuntimeCall>;
|
||||||
|
|
||||||
/// Origin which is allowed to execute overweight messages.
|
/// Origin which is allowed to execute overweight messages.
|
||||||
type ExecuteOverweightOrigin: EnsureOrigin<Self::Origin>;
|
type ExecuteOverweightOrigin: EnsureOrigin<Self::Origin>;
|
||||||
@@ -224,11 +224,11 @@ pub mod pallet {
|
|||||||
mut data: &[u8],
|
mut data: &[u8],
|
||||||
) -> Result<Weight, (MessageId, Weight)> {
|
) -> Result<Weight, (MessageId, Weight)> {
|
||||||
let message_id = sp_io::hashing::blake2_256(data);
|
let message_id = sp_io::hashing::blake2_256(data);
|
||||||
let maybe_msg = VersionedXcm::<T::Call>::decode_all_with_depth_limit(
|
let maybe_msg = VersionedXcm::<T::RuntimeCall>::decode_all_with_depth_limit(
|
||||||
MAX_XCM_DECODE_DEPTH,
|
MAX_XCM_DECODE_DEPTH,
|
||||||
&mut data,
|
&mut data,
|
||||||
)
|
)
|
||||||
.map(Xcm::<T::Call>::try_from);
|
.map(Xcm::<T::RuntimeCall>::try_from);
|
||||||
match maybe_msg {
|
match maybe_msg {
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
Self::deposit_event(Event::InvalidFormat { message_id });
|
Self::deposit_event(Event::InvalidFormat { message_id });
|
||||||
@@ -353,7 +353,7 @@ mod tests {
|
|||||||
|
|
||||||
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
|
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
|
||||||
type Block = frame_system::mocking::MockBlock<Test>;
|
type Block = frame_system::mocking::MockBlock<Test>;
|
||||||
type Xcm = xcm::latest::Xcm<Call>;
|
type Xcm = xcm::latest::Xcm<RuntimeCall>;
|
||||||
|
|
||||||
frame_support::construct_runtime!(
|
frame_support::construct_runtime!(
|
||||||
pub enum Test where
|
pub enum Test where
|
||||||
@@ -387,7 +387,7 @@ mod tests {
|
|||||||
|
|
||||||
impl frame_system::Config for Test {
|
impl frame_system::Config for Test {
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Index = u64;
|
type Index = u64;
|
||||||
type BlockNumber = u64;
|
type BlockNumber = u64;
|
||||||
type Hash = H256;
|
type Hash = H256;
|
||||||
@@ -395,7 +395,7 @@ mod tests {
|
|||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
type Lookup = IdentityLookup<Self::AccountId>;
|
type Lookup = IdentityLookup<Self::AccountId>;
|
||||||
type Header = Header;
|
type Header = Header;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type BlockLength = ();
|
type BlockLength = ();
|
||||||
type BlockWeights = ();
|
type BlockWeights = ();
|
||||||
@@ -425,7 +425,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct MockExec;
|
pub struct MockExec;
|
||||||
impl ExecuteXcm<Call> for MockExec {
|
impl ExecuteXcm<RuntimeCall> for MockExec {
|
||||||
fn execute_xcm_in_credit(
|
fn execute_xcm_in_credit(
|
||||||
_origin: impl Into<MultiLocation>,
|
_origin: impl Into<MultiLocation>,
|
||||||
message: Xcm,
|
message: Xcm,
|
||||||
@@ -449,7 +449,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Config for Test {
|
impl Config for Test {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = MockExec;
|
type XcmExecutor = MockExec;
|
||||||
type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
|
type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
|
||||||
}
|
}
|
||||||
@@ -465,7 +465,7 @@ mod tests {
|
|||||||
index.end_used,
|
index.end_used,
|
||||||
enqueued
|
enqueued
|
||||||
.iter()
|
.iter()
|
||||||
.map(|m| (0, VersionedXcm::<Call>::from(m.clone()).encode()))
|
.map(|m| (0, VersionedXcm::<RuntimeCall>::from(m.clone()).encode()))
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
);
|
);
|
||||||
index.end_used += 1;
|
index.end_used += 1;
|
||||||
@@ -474,7 +474,9 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn handle_messages(incoming: &[Xcm], limit: Weight) -> Weight {
|
fn handle_messages(incoming: &[Xcm], limit: Weight) -> Weight {
|
||||||
let iter = incoming.iter().map(|m| (0, VersionedXcm::<Call>::from(m.clone()).encode()));
|
let iter = incoming
|
||||||
|
.iter()
|
||||||
|
.map(|m| (0, VersionedXcm::<RuntimeCall>::from(m.clone()).encode()));
|
||||||
DmpQueue::handle_dmp_messages(iter, limit)
|
DmpQueue::handle_dmp_messages(iter, limit)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ pub mod pallet {
|
|||||||
#[pallet::config]
|
#[pallet::config]
|
||||||
pub trait Config: frame_system::Config<OnSetCode = ParachainSetCode<Self>> {
|
pub trait Config: frame_system::Config<OnSetCode = ParachainSetCode<Self>> {
|
||||||
/// The overarching event type.
|
/// The overarching event type.
|
||||||
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
|
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||||
|
|
||||||
/// Something which can be notified when the validation data is set.
|
/// Something which can be notified when the validation data is set.
|
||||||
type OnSystemEvent: OnSystemEvent;
|
type OnSystemEvent: OnSystemEvent;
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
impl frame_system::Config for Test {
|
impl frame_system::Config for Test {
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Index = u64;
|
type Index = u64;
|
||||||
type BlockNumber = u64;
|
type BlockNumber = u64;
|
||||||
type Hash = H256;
|
type Hash = H256;
|
||||||
@@ -82,7 +82,7 @@ impl frame_system::Config for Test {
|
|||||||
type AccountId = u64;
|
type AccountId = u64;
|
||||||
type Lookup = IdentityLookup<Self::AccountId>;
|
type Lookup = IdentityLookup<Self::AccountId>;
|
||||||
type Header = Header;
|
type Header = Header;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type BlockLength = ();
|
type BlockLength = ();
|
||||||
type BlockWeights = ();
|
type BlockWeights = ();
|
||||||
@@ -99,7 +99,7 @@ impl frame_system::Config for Test {
|
|||||||
type MaxConsumers = frame_support::traits::ConstU32<16>;
|
type MaxConsumers = frame_support::traits::ConstU32<16>;
|
||||||
}
|
}
|
||||||
impl Config for Test {
|
impl Config for Test {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = ();
|
type OnSystemEvent = ();
|
||||||
type SelfParaId = ParachainId;
|
type SelfParaId = ParachainId;
|
||||||
type OutboundXcmpMessageSource = FromThreadLocal;
|
type OutboundXcmpMessageSource = FromThreadLocal;
|
||||||
@@ -403,7 +403,7 @@ fn events() {
|
|||||||
let events = System::events();
|
let events = System::events();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
events[0].event,
|
events[0].event,
|
||||||
Event::ParachainSystem(crate::Event::ValidationFunctionStored.into())
|
RuntimeEvent::ParachainSystem(crate::Event::ValidationFunctionStored.into())
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@@ -414,7 +414,7 @@ fn events() {
|
|||||||
let events = System::events();
|
let events = System::events();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
events[0].event,
|
events[0].event,
|
||||||
Event::ParachainSystem(
|
RuntimeEvent::ParachainSystem(
|
||||||
crate::Event::ValidationFunctionApplied { relay_chain_block_num: 1234 }
|
crate::Event::ValidationFunctionApplied { relay_chain_block_num: 1234 }
|
||||||
.into()
|
.into()
|
||||||
)
|
)
|
||||||
@@ -490,7 +490,7 @@ fn aborted_upgrade() {
|
|||||||
let events = System::events();
|
let events = System::events();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
events[0].event,
|
events[0].event,
|
||||||
Event::ParachainSystem(crate::Event::ValidationFunctionDiscarded.into())
|
RuntimeEvent::ParachainSystem(crate::Event::ValidationFunctionDiscarded.into())
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ pub mod pallet {
|
|||||||
pub trait Config:
|
pub trait Config:
|
||||||
frame_system::Config + parachain_system::Config + pallet_sudo::Config
|
frame_system::Config + parachain_system::Config + pallet_sudo::Config
|
||||||
{
|
{
|
||||||
type Event: From<Event> + IsType<<Self as frame_system::Config>::Event>;
|
type RuntimeEvent: From<Event> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[pallet::pallet]
|
#[pallet::pallet]
|
||||||
@@ -133,10 +133,10 @@ pub mod pallet {
|
|||||||
|
|
||||||
impl<T: Config + Send + Sync> SignedExtension for CheckSudo<T>
|
impl<T: Config + Send + Sync> SignedExtension for CheckSudo<T>
|
||||||
where
|
where
|
||||||
<T as frame_system::Config>::Call: Dispatchable<Info = DispatchInfo>,
|
<T as frame_system::Config>::RuntimeCall: Dispatchable<Info = DispatchInfo>,
|
||||||
{
|
{
|
||||||
type AccountId = T::AccountId;
|
type AccountId = T::AccountId;
|
||||||
type Call = <T as frame_system::Config>::Call;
|
type Call = <T as frame_system::Config>::RuntimeCall;
|
||||||
type AdditionalSigned = ();
|
type AdditionalSigned = ();
|
||||||
type Pre = ();
|
type Pre = ();
|
||||||
const IDENTIFIER: &'static str = "CheckSudo";
|
const IDENTIFIER: &'static str = "CheckSudo";
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ pub mod pallet {
|
|||||||
#[pallet::config]
|
#[pallet::config]
|
||||||
pub trait Config: frame_system::Config {
|
pub trait Config: frame_system::Config {
|
||||||
/// The overarching event type.
|
/// The overarching event type.
|
||||||
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
|
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||||
|
|
||||||
type XcmExecutor: ExecuteXcm<Self::Call>;
|
type XcmExecutor: ExecuteXcm<Self::RuntimeCall>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[pallet::error]
|
#[pallet::error]
|
||||||
@@ -114,11 +114,11 @@ impl<T: Config> DmpMessageHandler for UnlimitedDmpExecution<T> {
|
|||||||
let mut used = Weight::zero();
|
let mut used = Weight::zero();
|
||||||
for (_sent_at, data) in iter {
|
for (_sent_at, data) in iter {
|
||||||
let id = sp_io::hashing::twox_64(&data[..]);
|
let id = sp_io::hashing::twox_64(&data[..]);
|
||||||
let msg = VersionedXcm::<T::Call>::decode_all_with_depth_limit(
|
let msg = VersionedXcm::<T::RuntimeCall>::decode_all_with_depth_limit(
|
||||||
MAX_XCM_DECODE_DEPTH,
|
MAX_XCM_DECODE_DEPTH,
|
||||||
&mut data.as_slice(),
|
&mut data.as_slice(),
|
||||||
)
|
)
|
||||||
.map(Xcm::<T::Call>::try_from);
|
.map(Xcm::<T::RuntimeCall>::try_from);
|
||||||
match msg {
|
match msg {
|
||||||
Err(_) => Pallet::<T>::deposit_event(Event::InvalidFormat(id)),
|
Err(_) => Pallet::<T>::deposit_event(Event::InvalidFormat(id)),
|
||||||
Ok(Err(())) => Pallet::<T>::deposit_event(Event::UnsupportedVersion(id)),
|
Ok(Err(())) => Pallet::<T>::deposit_event(Event::UnsupportedVersion(id)),
|
||||||
@@ -147,11 +147,11 @@ impl<T: Config> DmpMessageHandler for LimitAndDropDmpExecution<T> {
|
|||||||
let mut used = Weight::zero();
|
let mut used = Weight::zero();
|
||||||
for (_sent_at, data) in iter {
|
for (_sent_at, data) in iter {
|
||||||
let id = sp_io::hashing::twox_64(&data[..]);
|
let id = sp_io::hashing::twox_64(&data[..]);
|
||||||
let msg = VersionedXcm::<T::Call>::decode_all_with_depth_limit(
|
let msg = VersionedXcm::<T::RuntimeCall>::decode_all_with_depth_limit(
|
||||||
MAX_XCM_DECODE_DEPTH,
|
MAX_XCM_DECODE_DEPTH,
|
||||||
&mut data.as_slice(),
|
&mut data.as_slice(),
|
||||||
)
|
)
|
||||||
.map(Xcm::<T::Call>::try_from);
|
.map(Xcm::<T::RuntimeCall>::try_from);
|
||||||
match msg {
|
match msg {
|
||||||
Err(_) => Pallet::<T>::deposit_event(Event::InvalidFormat(id)),
|
Err(_) => Pallet::<T>::deposit_event(Event::InvalidFormat(id)),
|
||||||
Ok(Err(())) => Pallet::<T>::deposit_event(Event::UnsupportedVersion(id)),
|
Ok(Err(())) => Pallet::<T>::deposit_event(Event::UnsupportedVersion(id)),
|
||||||
|
|||||||
@@ -78,10 +78,10 @@ pub mod pallet {
|
|||||||
|
|
||||||
#[pallet::config]
|
#[pallet::config]
|
||||||
pub trait Config: frame_system::Config {
|
pub trait Config: frame_system::Config {
|
||||||
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
|
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||||
|
|
||||||
/// Something to execute an XCM message. We need this to service the XCMoXCMP queue.
|
/// Something to execute an XCM message. We need this to service the XCMoXCMP queue.
|
||||||
type XcmExecutor: ExecuteXcm<Self::Call>;
|
type XcmExecutor: ExecuteXcm<Self::RuntimeCall>;
|
||||||
|
|
||||||
/// Information on the avaialble XCMP channels.
|
/// Information on the avaialble XCMP channels.
|
||||||
type ChannelInfo: GetChannelInfo;
|
type ChannelInfo: GetChannelInfo;
|
||||||
@@ -140,7 +140,7 @@ pub mod pallet {
|
|||||||
|
|
||||||
let (sender, sent_at, data) =
|
let (sender, sent_at, data) =
|
||||||
Overweight::<T>::get(index).ok_or(Error::<T>::BadOverweightIndex)?;
|
Overweight::<T>::get(index).ok_or(Error::<T>::BadOverweightIndex)?;
|
||||||
let xcm = VersionedXcm::<T::Call>::decode_all_with_depth_limit(
|
let xcm = VersionedXcm::<T::RuntimeCall>::decode_all_with_depth_limit(
|
||||||
MAX_XCM_DECODE_DEPTH,
|
MAX_XCM_DECODE_DEPTH,
|
||||||
&mut data.as_slice(),
|
&mut data.as_slice(),
|
||||||
)
|
)
|
||||||
@@ -596,12 +596,12 @@ impl<T: Config> Pallet<T> {
|
|||||||
fn handle_xcm_message(
|
fn handle_xcm_message(
|
||||||
sender: ParaId,
|
sender: ParaId,
|
||||||
_sent_at: RelayBlockNumber,
|
_sent_at: RelayBlockNumber,
|
||||||
xcm: VersionedXcm<T::Call>,
|
xcm: VersionedXcm<T::RuntimeCall>,
|
||||||
max_weight: Weight,
|
max_weight: Weight,
|
||||||
) -> Result<Weight, XcmError> {
|
) -> Result<Weight, XcmError> {
|
||||||
let hash = Encode::using_encoded(&xcm, T::Hashing::hash);
|
let hash = Encode::using_encoded(&xcm, T::Hashing::hash);
|
||||||
log::debug!("Processing XCMP-XCM: {:?}", &hash);
|
log::debug!("Processing XCMP-XCM: {:?}", &hash);
|
||||||
let (result, event) = match Xcm::<T::Call>::try_from(xcm) {
|
let (result, event) = match Xcm::<T::RuntimeCall>::try_from(xcm) {
|
||||||
Ok(xcm) => {
|
Ok(xcm) => {
|
||||||
let location = (1, Parachain(sender.into()));
|
let location = (1, Parachain(sender.into()));
|
||||||
|
|
||||||
@@ -650,7 +650,7 @@ impl<T: Config> Pallet<T> {
|
|||||||
XcmpMessageFormat::ConcatenatedVersionedXcm => {
|
XcmpMessageFormat::ConcatenatedVersionedXcm => {
|
||||||
while !remaining_fragments.is_empty() {
|
while !remaining_fragments.is_empty() {
|
||||||
last_remaining_fragments = remaining_fragments;
|
last_remaining_fragments = remaining_fragments;
|
||||||
if let Ok(xcm) = VersionedXcm::<T::Call>::decode_with_depth_limit(
|
if let Ok(xcm) = VersionedXcm::<T::RuntimeCall>::decode_with_depth_limit(
|
||||||
MAX_XCM_DECODE_DEPTH,
|
MAX_XCM_DECODE_DEPTH,
|
||||||
&mut remaining_fragments,
|
&mut remaining_fragments,
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ impl frame_system::Config for Test {
|
|||||||
type BlockLength = ();
|
type BlockLength = ();
|
||||||
type DbWeight = ();
|
type DbWeight = ();
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Index = u64;
|
type Index = u64;
|
||||||
type BlockNumber = u64;
|
type BlockNumber = u64;
|
||||||
type Hash = H256;
|
type Hash = H256;
|
||||||
@@ -71,7 +71,7 @@ impl frame_system::Config for Test {
|
|||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
type Lookup = IdentityLookup<Self::AccountId>;
|
type Lookup = IdentityLookup<Self::AccountId>;
|
||||||
type Header = Header;
|
type Header = Header;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
type PalletInfo = PalletInfo;
|
type PalletInfo = PalletInfo;
|
||||||
@@ -91,7 +91,7 @@ parameter_types! {
|
|||||||
|
|
||||||
impl pallet_balances::Config for Test {
|
impl pallet_balances::Config for Test {
|
||||||
type Balance = u64;
|
type Balance = u64;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ExistentialDeposit;
|
type ExistentialDeposit = ExistentialDeposit;
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
@@ -102,7 +102,7 @@ impl pallet_balances::Config for Test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Test {
|
impl cumulus_pallet_parachain_system::Config for Test {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = ();
|
type OnSystemEvent = ();
|
||||||
type SelfParaId = ();
|
type SelfParaId = ();
|
||||||
type OutboundXcmpMessageSource = XcmpQueue;
|
type OutboundXcmpMessageSource = XcmpQueue;
|
||||||
@@ -138,7 +138,7 @@ pub type LocationToAccountId = (ParentIsPreset<AccountId>,);
|
|||||||
|
|
||||||
pub struct XcmConfig;
|
pub struct XcmConfig;
|
||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
// How to withdraw and deposit an asset.
|
// How to withdraw and deposit an asset.
|
||||||
type AssetTransactor = LocalAssetTransactor;
|
type AssetTransactor = LocalAssetTransactor;
|
||||||
@@ -147,7 +147,7 @@ impl xcm_executor::Config for XcmConfig {
|
|||||||
type IsTeleporter = NativeAsset;
|
type IsTeleporter = NativeAsset;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Barrier = ();
|
type Barrier = ();
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||||
type Trader = ();
|
type Trader = ();
|
||||||
type ResponseHandler = ();
|
type ResponseHandler = ();
|
||||||
type AssetTrap = ();
|
type AssetTrap = ();
|
||||||
@@ -183,7 +183,7 @@ impl<Origin: OriginTrait> ConvertOrigin<Origin> for SystemParachainAsSuperuser<O
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Config for Test {
|
impl Config for Test {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = xcm_executor::XcmExecutor<XcmConfig>;
|
type XcmExecutor = xcm_executor::XcmExecutor<XcmConfig>;
|
||||||
type ChannelInfo = ParachainSystem;
|
type ChannelInfo = ParachainSystem;
|
||||||
type VersionWrapper = ();
|
type VersionWrapper = ();
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
use super::*;
|
use super::*;
|
||||||
use cumulus_primitives_core::XcmpMessageHandler;
|
use cumulus_primitives_core::XcmpMessageHandler;
|
||||||
use frame_support::{assert_noop, assert_ok};
|
use frame_support::{assert_noop, assert_ok};
|
||||||
use mock::{new_test_ext, Call, Origin, Test, XcmpQueue};
|
use mock::{new_test_ext, Origin, RuntimeCall, Test, XcmpQueue};
|
||||||
use sp_runtime::traits::BadOrigin;
|
use sp_runtime::traits::BadOrigin;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -120,7 +120,9 @@ fn suspend_xcm_execution_works() {
|
|||||||
new_test_ext().execute_with(|| {
|
new_test_ext().execute_with(|| {
|
||||||
QueueSuspended::<Test>::put(true);
|
QueueSuspended::<Test>::put(true);
|
||||||
|
|
||||||
let xcm = VersionedXcm::from(Xcm::<Call>(vec![Instruction::<Call>::ClearOrigin])).encode();
|
let xcm =
|
||||||
|
VersionedXcm::from(Xcm::<RuntimeCall>(vec![Instruction::<RuntimeCall>::ClearOrigin]))
|
||||||
|
.encode();
|
||||||
let mut message_format = XcmpMessageFormat::ConcatenatedVersionedXcm.encode();
|
let mut message_format = XcmpMessageFormat::ConcatenatedVersionedXcm.encode();
|
||||||
message_format.extend(xcm.clone());
|
message_format.extend(xcm.clone());
|
||||||
let messages = vec![(ParaId::from(999), 1u32.into(), message_format.as_slice())];
|
let messages = vec![(ParaId::from(999), 1u32.into(), message_format.as_slice())];
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ pub mod pallet {
|
|||||||
#[pallet::config]
|
#[pallet::config]
|
||||||
pub trait Config: frame_system::Config {
|
pub trait Config: frame_system::Config {
|
||||||
/// Because this pallet emits events, it depends on the runtime's definition of an event.
|
/// Because this pallet emits events, it depends on the runtime's definition of an event.
|
||||||
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
|
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[pallet::pallet]
|
#[pallet::pallet]
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ impl system::Config for Test {
|
|||||||
type BlockLength = ();
|
type BlockLength = ();
|
||||||
type DbWeight = ();
|
type DbWeight = ();
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Index = u64;
|
type Index = u64;
|
||||||
type BlockNumber = u64;
|
type BlockNumber = u64;
|
||||||
type Hash = H256;
|
type Hash = H256;
|
||||||
@@ -41,7 +41,7 @@ impl system::Config for Test {
|
|||||||
type AccountId = u64;
|
type AccountId = u64;
|
||||||
type Lookup = IdentityLookup<Self::AccountId>;
|
type Lookup = IdentityLookup<Self::AccountId>;
|
||||||
type Header = Header;
|
type Header = Header;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
type PalletInfo = PalletInfo;
|
type PalletInfo = PalletInfo;
|
||||||
@@ -55,7 +55,7 @@ impl system::Config for Test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_template::Config for Test {
|
impl pallet_template::Config for Test {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build genesis storage according to the mock runtime.
|
// Build genesis storage according to the mock runtime.
|
||||||
|
|||||||
@@ -104,10 +104,11 @@ pub type SignedExtra = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Unchecked extrinsic type as expected by this runtime.
|
/// Unchecked extrinsic type as expected by this runtime.
|
||||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
pub type UncheckedExtrinsic =
|
||||||
|
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||||
|
|
||||||
/// Extrinsic type that has already been checked.
|
/// Extrinsic type that has already been checked.
|
||||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
|
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
|
||||||
|
|
||||||
/// Executive: handles dispatch to the various modules.
|
/// Executive: handles dispatch to the various modules.
|
||||||
pub type Executive = frame_executive::Executive<
|
pub type Executive = frame_executive::Executive<
|
||||||
@@ -258,7 +259,7 @@ impl frame_system::Config for Runtime {
|
|||||||
/// The identifier used to distinguish between accounts.
|
/// The identifier used to distinguish between accounts.
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
/// The aggregated dispatch type that is available for extrinsics.
|
/// The aggregated dispatch type that is available for extrinsics.
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||||
/// The index type for storing how many extrinsics an account has signed.
|
/// The index type for storing how many extrinsics an account has signed.
|
||||||
@@ -272,7 +273,7 @@ impl frame_system::Config for Runtime {
|
|||||||
/// The header type.
|
/// The header type.
|
||||||
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
/// The ubiquitous origin type.
|
/// The ubiquitous origin type.
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
||||||
@@ -338,7 +339,7 @@ impl pallet_balances::Config for Runtime {
|
|||||||
/// The type for recording an account's balance.
|
/// The type for recording an account's balance.
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ExistentialDeposit;
|
type ExistentialDeposit = ExistentialDeposit;
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
@@ -354,7 +355,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
|
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
|
||||||
type WeightToFee = WeightToFee;
|
type WeightToFee = WeightToFee;
|
||||||
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
|
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
|
||||||
@@ -368,7 +369,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Runtime {
|
impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = ();
|
type OnSystemEvent = ();
|
||||||
type SelfParaId = parachain_info::Pallet<Runtime>;
|
type SelfParaId = parachain_info::Pallet<Runtime>;
|
||||||
type OutboundXcmpMessageSource = XcmpQueue;
|
type OutboundXcmpMessageSource = XcmpQueue;
|
||||||
@@ -384,7 +385,7 @@ impl parachain_info::Config for Runtime {}
|
|||||||
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
||||||
|
|
||||||
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ChannelInfo = ParachainSystem;
|
type ChannelInfo = ParachainSystem;
|
||||||
type VersionWrapper = ();
|
type VersionWrapper = ();
|
||||||
@@ -395,7 +396,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
||||||
}
|
}
|
||||||
@@ -407,7 +408,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_session::Config for Runtime {
|
impl pallet_session::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
||||||
// we don't have stash and controller, thus we don't need the convert as well.
|
// we don't have stash and controller, thus we don't need the convert as well.
|
||||||
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
||||||
@@ -439,7 +440,7 @@ parameter_types! {
|
|||||||
pub type CollatorSelectionUpdateOrigin = EnsureRoot<AccountId>;
|
pub type CollatorSelectionUpdateOrigin = EnsureRoot<AccountId>;
|
||||||
|
|
||||||
impl pallet_collator_selection::Config for Runtime {
|
impl pallet_collator_selection::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
||||||
type PotId = PotId;
|
type PotId = PotId;
|
||||||
@@ -456,7 +457,7 @@ impl pallet_collator_selection::Config for Runtime {
|
|||||||
|
|
||||||
/// Configure the pallet template in pallets/template.
|
/// Configure the pallet template in pallets/template.
|
||||||
impl pallet_template::Config for Runtime {
|
impl pallet_template::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the runtime by composing the FRAME pallets that were previously configured.
|
// Create the runtime by composing the FRAME pallets that were previously configured.
|
||||||
@@ -613,17 +614,17 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
|
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||||
for Runtime
|
for Runtime
|
||||||
{
|
{
|
||||||
fn query_call_info(
|
fn query_call_info(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||||
TransactionPayment::query_call_info(call, len)
|
TransactionPayment::query_call_info(call, len)
|
||||||
}
|
}
|
||||||
fn query_call_fee_details(
|
fn query_call_fee_details(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||||
TransactionPayment::query_call_fee_details(call, len)
|
TransactionPayment::query_call_fee_details(call, len)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use super::{
|
use super::{
|
||||||
AccountId, Balances, Call, Event, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime,
|
AccountId, Balances, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall,
|
||||||
WeightToFee, XcmpQueue,
|
RuntimeEvent, WeightToFee, XcmpQueue,
|
||||||
};
|
};
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
@@ -100,9 +100,9 @@ where
|
|||||||
Deny: ShouldExecute,
|
Deny: ShouldExecute,
|
||||||
Allow: ShouldExecute,
|
Allow: ShouldExecute,
|
||||||
{
|
{
|
||||||
fn should_execute<Call>(
|
fn should_execute<RuntimeCall>(
|
||||||
origin: &MultiLocation,
|
origin: &MultiLocation,
|
||||||
message: &mut Xcm<Call>,
|
message: &mut Xcm<RuntimeCall>,
|
||||||
max_weight: XCMWeight,
|
max_weight: XCMWeight,
|
||||||
weight_credit: &mut XCMWeight,
|
weight_credit: &mut XCMWeight,
|
||||||
) -> Result<(), ()> {
|
) -> Result<(), ()> {
|
||||||
@@ -114,9 +114,10 @@ where
|
|||||||
// See issue #5233
|
// See issue #5233
|
||||||
pub struct DenyReserveTransferToRelayChain;
|
pub struct DenyReserveTransferToRelayChain;
|
||||||
impl ShouldExecute for DenyReserveTransferToRelayChain {
|
impl ShouldExecute for DenyReserveTransferToRelayChain {
|
||||||
fn should_execute<Call>(
|
fn should_execute<RuntimeCall>(
|
||||||
origin: &MultiLocation,
|
origin: &MultiLocation,
|
||||||
message: &mut Xcm<Call>,
|
|
||||||
|
message: &mut Xcm<RuntimeCall>,
|
||||||
_max_weight: XCMWeight,
|
_max_weight: XCMWeight,
|
||||||
_weight_credit: &mut XCMWeight,
|
_weight_credit: &mut XCMWeight,
|
||||||
) -> Result<(), ()> {
|
) -> Result<(), ()> {
|
||||||
@@ -163,7 +164,7 @@ pub type Barrier = DenyThenTry<
|
|||||||
|
|
||||||
pub struct XcmConfig;
|
pub struct XcmConfig;
|
||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
// How to withdraw and deposit an asset.
|
// How to withdraw and deposit an asset.
|
||||||
type AssetTransactor = LocalAssetTransactor;
|
type AssetTransactor = LocalAssetTransactor;
|
||||||
@@ -172,7 +173,7 @@ impl xcm_executor::Config for XcmConfig {
|
|||||||
type IsTeleporter = (); // Teleporting is disabled.
|
type IsTeleporter = (); // Teleporting is disabled.
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Barrier = Barrier;
|
type Barrier = Barrier;
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||||
type Trader =
|
type Trader =
|
||||||
UsingComponents<WeightToFee, RelayLocation, AccountId, Balances, ToAuthor<Runtime>>;
|
UsingComponents<WeightToFee, RelayLocation, AccountId, Balances, ToAuthor<Runtime>>;
|
||||||
type ResponseHandler = PolkadotXcm;
|
type ResponseHandler = PolkadotXcm;
|
||||||
@@ -194,7 +195,7 @@ pub type XcmRouter = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
impl pallet_xcm::Config for Runtime {
|
impl pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
type SendXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||||
@@ -204,10 +205,10 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Nothing;
|
type XcmReserveTransferFilter = Nothing;
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
|
|
||||||
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
||||||
// ^ Override for AdvertisedXcmVersion default
|
// ^ Override for AdvertisedXcmVersion default
|
||||||
@@ -215,6 +216,6 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_xcm::Config for Runtime {
|
impl cumulus_pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ where
|
|||||||
R: pallet_balances::Config + pallet_collator_selection::Config,
|
R: pallet_balances::Config + pallet_collator_selection::Config,
|
||||||
AccountIdOf<R>:
|
AccountIdOf<R>:
|
||||||
From<polkadot_primitives::v2::AccountId> + Into<polkadot_primitives::v2::AccountId>,
|
From<polkadot_primitives::v2::AccountId> + Into<polkadot_primitives::v2::AccountId>,
|
||||||
<R as frame_system::Config>::Event: From<pallet_balances::Event<R>>,
|
<R as frame_system::Config>::RuntimeEvent: From<pallet_balances::Event<R>>,
|
||||||
{
|
{
|
||||||
fn on_nonzero_unbalanced(amount: NegativeImbalance<R>) {
|
fn on_nonzero_unbalanced(amount: NegativeImbalance<R>) {
|
||||||
let staking_pot = <pallet_collator_selection::Pallet<R>>::account_id();
|
let staking_pot = <pallet_collator_selection::Pallet<R>>::account_id();
|
||||||
@@ -57,7 +57,7 @@ where
|
|||||||
R: pallet_balances::Config + pallet_collator_selection::Config,
|
R: pallet_balances::Config + pallet_collator_selection::Config,
|
||||||
AccountIdOf<R>:
|
AccountIdOf<R>:
|
||||||
From<polkadot_primitives::v2::AccountId> + Into<polkadot_primitives::v2::AccountId>,
|
From<polkadot_primitives::v2::AccountId> + Into<polkadot_primitives::v2::AccountId>,
|
||||||
<R as frame_system::Config>::Event: From<pallet_balances::Event<R>>,
|
<R as frame_system::Config>::RuntimeEvent: From<pallet_balances::Event<R>>,
|
||||||
{
|
{
|
||||||
fn on_unbalanceds<B>(mut fees_then_tips: impl Iterator<Item = NegativeImbalance<R>>) {
|
fn on_unbalanceds<B>(mut fees_then_tips: impl Iterator<Item = NegativeImbalance<R>>) {
|
||||||
if let Some(mut fees) = fees_then_tips.next() {
|
if let Some(mut fees) = fees_then_tips.next() {
|
||||||
@@ -156,13 +156,13 @@ mod tests {
|
|||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Index = u64;
|
type Index = u64;
|
||||||
type BlockNumber = u64;
|
type BlockNumber = u64;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Hash = H256;
|
type Hash = H256;
|
||||||
type Hashing = BlakeTwo256;
|
type Hashing = BlakeTwo256;
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
type Lookup = IdentityLookup<Self::AccountId>;
|
type Lookup = IdentityLookup<Self::AccountId>;
|
||||||
type Header = Header;
|
type Header = Header;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type BlockLength = BlockLength;
|
type BlockLength = BlockLength;
|
||||||
type BlockWeights = ();
|
type BlockWeights = ();
|
||||||
@@ -180,7 +180,7 @@ mod tests {
|
|||||||
|
|
||||||
impl pallet_balances::Config for Test {
|
impl pallet_balances::Config for Test {
|
||||||
type Balance = u64;
|
type Balance = u64;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ();
|
type ExistentialDeposit = ();
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
@@ -215,7 +215,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_collator_selection::Config for Test {
|
impl pallet_collator_selection::Config for Test {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UpdateOrigin = EnsureRoot<AccountId>;
|
type UpdateOrigin = EnsureRoot<AccountId>;
|
||||||
type PotId = PotId;
|
type PotId = PotId;
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ where
|
|||||||
Deny: ShouldExecute,
|
Deny: ShouldExecute,
|
||||||
Allow: ShouldExecute,
|
Allow: ShouldExecute,
|
||||||
{
|
{
|
||||||
fn should_execute<Call>(
|
fn should_execute<RuntimeCall>(
|
||||||
origin: &MultiLocation,
|
origin: &MultiLocation,
|
||||||
message: &mut Xcm<Call>,
|
message: &mut Xcm<RuntimeCall>,
|
||||||
max_weight: XCMWeight,
|
max_weight: XCMWeight,
|
||||||
weight_credit: &mut XCMWeight,
|
weight_credit: &mut XCMWeight,
|
||||||
) -> Result<(), ()> {
|
) -> Result<(), ()> {
|
||||||
@@ -36,9 +36,9 @@ where
|
|||||||
// See issue #5233
|
// See issue #5233
|
||||||
pub struct DenyReserveTransferToRelayChain;
|
pub struct DenyReserveTransferToRelayChain;
|
||||||
impl ShouldExecute for DenyReserveTransferToRelayChain {
|
impl ShouldExecute for DenyReserveTransferToRelayChain {
|
||||||
fn should_execute<Call>(
|
fn should_execute<RuntimeCall>(
|
||||||
origin: &MultiLocation,
|
origin: &MultiLocation,
|
||||||
message: &mut Xcm<Call>,
|
message: &mut Xcm<RuntimeCall>,
|
||||||
_max_weight: XCMWeight,
|
_max_weight: XCMWeight,
|
||||||
_weight_credit: &mut XCMWeight,
|
_weight_credit: &mut XCMWeight,
|
||||||
) -> Result<(), ()> {
|
) -> Result<(), ()> {
|
||||||
|
|||||||
@@ -47,13 +47,13 @@ pub mod pallet {
|
|||||||
#[pallet::config]
|
#[pallet::config]
|
||||||
pub trait Config: frame_system::Config {
|
pub trait Config: frame_system::Config {
|
||||||
/// The overarching event type.
|
/// The overarching event type.
|
||||||
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
|
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||||
|
|
||||||
type Origin: From<<Self as SystemConfig>::Origin>
|
type Origin: From<<Self as SystemConfig>::Origin>
|
||||||
+ Into<Result<CumulusOrigin, <Self as Config>::Origin>>;
|
+ Into<Result<CumulusOrigin, <Self as Config>::Origin>>;
|
||||||
|
|
||||||
/// The overarching call type; we assume sibling chains use the same type.
|
/// The overarching call type; we assume sibling chains use the same type.
|
||||||
type Call: From<Call<Self>> + Encode;
|
type RuntimeCall: From<Call<Self>> + Encode;
|
||||||
|
|
||||||
type XcmSender: SendXcm;
|
type XcmSender: SendXcm;
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@ pub mod pallet {
|
|||||||
Xcm(vec![Transact {
|
Xcm(vec![Transact {
|
||||||
origin_type: OriginKind::Native,
|
origin_type: OriginKind::Native,
|
||||||
require_weight_at_most: 1_000,
|
require_weight_at_most: 1_000,
|
||||||
call: <T as Config>::Call::from(Call::<T>::ping {
|
call: <T as Config>::RuntimeCall::from(Call::<T>::ping {
|
||||||
seq,
|
seq,
|
||||||
payload: payload.clone().to_vec(),
|
payload: payload.clone().to_vec(),
|
||||||
})
|
})
|
||||||
@@ -198,7 +198,7 @@ pub mod pallet {
|
|||||||
Xcm(vec![Transact {
|
Xcm(vec![Transact {
|
||||||
origin_type: OriginKind::Native,
|
origin_type: OriginKind::Native,
|
||||||
require_weight_at_most: 1_000,
|
require_weight_at_most: 1_000,
|
||||||
call: <T as Config>::Call::from(Call::<T>::pong {
|
call: <T as Config>::RuntimeCall::from(Call::<T>::pong {
|
||||||
seq,
|
seq,
|
||||||
payload: payload.clone(),
|
payload: payload.clone(),
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -129,14 +129,14 @@ impl frame_system::Config for Runtime {
|
|||||||
type BlockWeights = RuntimeBlockWeights;
|
type BlockWeights = RuntimeBlockWeights;
|
||||||
type BlockLength = RuntimeBlockLength;
|
type BlockLength = RuntimeBlockLength;
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||||
type Index = Index;
|
type Index = Index;
|
||||||
type BlockNumber = BlockNumber;
|
type BlockNumber = BlockNumber;
|
||||||
type Hash = Hash;
|
type Hash = Hash;
|
||||||
type Hashing = BlakeTwo256;
|
type Hashing = BlakeTwo256;
|
||||||
type Header = Header;
|
type Header = Header;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type DbWeight = RocksDbWeight;
|
type DbWeight = RocksDbWeight;
|
||||||
@@ -185,7 +185,7 @@ impl pallet_balances::Config for Runtime {
|
|||||||
/// The type for recording an account's balance.
|
/// The type for recording an account's balance.
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ExistentialDeposit;
|
type ExistentialDeposit = ExistentialDeposit;
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
@@ -201,7 +201,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnChargeTransaction =
|
type OnChargeTransaction =
|
||||||
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
|
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
|
||||||
type WeightToFee = WeightToFee;
|
type WeightToFee = WeightToFee;
|
||||||
@@ -227,7 +227,7 @@ pub type AssetsForceOrigin =
|
|||||||
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>>;
|
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>>;
|
||||||
|
|
||||||
impl pallet_assets::Config for Runtime {
|
impl pallet_assets::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
type AssetId = AssetId;
|
type AssetId = AssetId;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
@@ -252,8 +252,8 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_multisig::Config for Runtime {
|
impl pallet_multisig::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type DepositBase = DepositBase;
|
type DepositBase = DepositBase;
|
||||||
type DepositFactor = DepositFactor;
|
type DepositFactor = DepositFactor;
|
||||||
@@ -262,8 +262,8 @@ impl pallet_multisig::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_utility::Config for Runtime {
|
impl pallet_utility::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type PalletsOrigin = OriginCaller;
|
type PalletsOrigin = OriginCaller;
|
||||||
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
@@ -315,65 +315,75 @@ impl Default for ProxyType {
|
|||||||
Self::Any
|
Self::Any
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl InstanceFilter<Call> for ProxyType {
|
impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||||
fn filter(&self, c: &Call) -> bool {
|
fn filter(&self, c: &RuntimeCall) -> bool {
|
||||||
match self {
|
match self {
|
||||||
ProxyType::Any => true,
|
ProxyType::Any => true,
|
||||||
ProxyType::NonTransfer =>
|
ProxyType::NonTransfer => !matches!(
|
||||||
!matches!(c, Call::Balances { .. } | Call::Assets { .. } | Call::Uniques { .. }),
|
c,
|
||||||
|
RuntimeCall::Balances { .. } |
|
||||||
|
RuntimeCall::Assets { .. } |
|
||||||
|
RuntimeCall::Uniques { .. }
|
||||||
|
),
|
||||||
ProxyType::CancelProxy => matches!(
|
ProxyType::CancelProxy => matches!(
|
||||||
c,
|
c,
|
||||||
Call::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
|
RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
|
||||||
Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
ProxyType::Assets => {
|
ProxyType::Assets => {
|
||||||
matches!(
|
matches!(
|
||||||
c,
|
c,
|
||||||
Call::Assets { .. } |
|
RuntimeCall::Assets { .. } |
|
||||||
Call::Utility { .. } | Call::Multisig { .. } |
|
RuntimeCall::Utility { .. } |
|
||||||
Call::Uniques { .. }
|
RuntimeCall::Multisig { .. } |
|
||||||
|
RuntimeCall::Uniques { .. }
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
ProxyType::AssetOwner => matches!(
|
ProxyType::AssetOwner => matches!(
|
||||||
c,
|
c,
|
||||||
Call::Assets(pallet_assets::Call::create { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::create { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::destroy { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::destroy { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::transfer_ownership { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::transfer_ownership { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::set_team { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::set_team { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::set_metadata { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::set_metadata { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::clear_metadata { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::clear_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::create { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::create { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::destroy { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::destroy { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_team { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_team { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_metadata { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_attribute { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_attribute { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::clear_metadata { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::clear_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::clear_attribute { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::clear_attribute { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_collection_max_supply { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_collection_max_supply { .. }) |
|
||||||
Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
ProxyType::AssetManager => matches!(
|
ProxyType::AssetManager => matches!(
|
||||||
c,
|
c,
|
||||||
Call::Assets(pallet_assets::Call::mint { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::mint { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::burn { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::burn { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::freeze { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::freeze { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::thaw { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::thaw { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::freeze_asset { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::freeze_asset { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::thaw_asset { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::thaw_asset { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::mint { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::mint { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::burn { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::burn { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::freeze { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::freeze { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::thaw { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::thaw { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::freeze_collection { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::freeze_collection { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::thaw_collection { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::thaw_collection { .. }) |
|
||||||
Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
ProxyType::Collator => matches!(
|
ProxyType::Collator => matches!(
|
||||||
c,
|
c,
|
||||||
Call::CollatorSelection { .. } | Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::CollatorSelection { .. } |
|
||||||
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -392,8 +402,8 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_proxy::Config for Runtime {
|
impl pallet_proxy::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type ProxyType = ProxyType;
|
type ProxyType = ProxyType;
|
||||||
type ProxyDepositBase = ProxyDepositBase;
|
type ProxyDepositBase = ProxyDepositBase;
|
||||||
@@ -412,7 +422,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Runtime {
|
impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = ();
|
type OnSystemEvent = ();
|
||||||
type SelfParaId = parachain_info::Pallet<Runtime>;
|
type SelfParaId = parachain_info::Pallet<Runtime>;
|
||||||
type DmpMessageHandler = DmpQueue;
|
type DmpMessageHandler = DmpQueue;
|
||||||
@@ -428,7 +438,7 @@ impl parachain_info::Config for Runtime {}
|
|||||||
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
||||||
|
|
||||||
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ChannelInfo = ParachainSystem;
|
type ChannelInfo = ParachainSystem;
|
||||||
type VersionWrapper = PolkadotXcm;
|
type VersionWrapper = PolkadotXcm;
|
||||||
@@ -442,7 +452,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
||||||
}
|
}
|
||||||
@@ -454,7 +464,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_session::Config for Runtime {
|
impl pallet_session::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
||||||
// we don't have stash and controller, thus we don't need the convert as well.
|
// we don't have stash and controller, thus we don't need the convert as well.
|
||||||
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
||||||
@@ -486,7 +496,7 @@ pub type CollatorSelectionUpdateOrigin =
|
|||||||
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>>;
|
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>>;
|
||||||
|
|
||||||
impl pallet_collator_selection::Config for Runtime {
|
impl pallet_collator_selection::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
||||||
type PotId = PotId;
|
type PotId = PotId;
|
||||||
@@ -502,7 +512,7 @@ impl pallet_collator_selection::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_asset_tx_payment::Config for Runtime {
|
impl pallet_asset_tx_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Fungibles = Assets;
|
type Fungibles = Assets;
|
||||||
type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
|
type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
|
||||||
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
|
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
|
||||||
@@ -522,7 +532,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_uniques::Config for Runtime {
|
impl pallet_uniques::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type CollectionId = u32;
|
type CollectionId = u32;
|
||||||
type ItemId = u32;
|
type ItemId = u32;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
@@ -607,9 +617,10 @@ pub type SignedExtra = (
|
|||||||
pallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>,
|
pallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>,
|
||||||
);
|
);
|
||||||
/// Unchecked extrinsic type as expected by this runtime.
|
/// Unchecked extrinsic type as expected by this runtime.
|
||||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
pub type UncheckedExtrinsic =
|
||||||
|
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||||
/// Extrinsic type that has already been checked.
|
/// Extrinsic type that has already been checked.
|
||||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
|
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
|
||||||
/// Executive: handles dispatch to the various modules.
|
/// Executive: handles dispatch to the various modules.
|
||||||
pub type Executive = frame_executive::Executive<
|
pub type Executive = frame_executive::Executive<
|
||||||
Runtime,
|
Runtime,
|
||||||
@@ -746,17 +757,17 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
|
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||||
for Runtime
|
for Runtime
|
||||||
{
|
{
|
||||||
fn query_call_info(
|
fn query_call_info(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||||
TransactionPayment::query_call_info(call, len)
|
TransactionPayment::query_call_info(call, len)
|
||||||
}
|
}
|
||||||
fn query_call_fee_details(
|
fn query_call_fee_details(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||||
TransactionPayment::query_call_fee_details(call, len)
|
TransactionPayment::query_call_fee_details(call, len)
|
||||||
@@ -889,7 +900,7 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_xcm_benchmarks::generic::Config for Runtime {
|
impl pallet_xcm_benchmarks::generic::Config for Runtime {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
|
|
||||||
fn worst_case_response() -> (u64, Response) {
|
fn worst_case_response() -> (u64, Response) {
|
||||||
(0u64, Response::Version(Default::default()))
|
(0u64, Response::Version(Default::default()))
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
AccountId, AssetId, Assets, Authorship, Balance, Balances, Call, Event, Origin, ParachainInfo,
|
AccountId, AssetId, Assets, Authorship, Balance, Balances, Origin, ParachainInfo,
|
||||||
ParachainSystem, PolkadotXcm, Runtime, WeightToFee, XcmpQueue,
|
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, WeightToFee, XcmpQueue,
|
||||||
};
|
};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
match_types, parameter_types,
|
match_types, parameter_types,
|
||||||
@@ -159,7 +159,7 @@ pub type Barrier = DenyThenTry<
|
|||||||
|
|
||||||
pub struct XcmConfig;
|
pub struct XcmConfig;
|
||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
type AssetTransactor = AssetTransactors;
|
type AssetTransactor = AssetTransactors;
|
||||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||||
@@ -170,8 +170,11 @@ impl xcm_executor::Config for XcmConfig {
|
|||||||
type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of KSM
|
type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of KSM
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Barrier = Barrier;
|
type Barrier = Barrier;
|
||||||
type Weigher =
|
type Weigher = WeightInfoBounds<
|
||||||
WeightInfoBounds<crate::weights::xcm::StatemineXcmWeight<Call>, Call, MaxInstructions>;
|
crate::weights::xcm::StatemineXcmWeight<RuntimeCall>,
|
||||||
|
RuntimeCall,
|
||||||
|
MaxInstructions,
|
||||||
|
>;
|
||||||
type Trader = (
|
type Trader = (
|
||||||
UsingComponents<WeightToFee, KsmLocation, AccountId, Balances, ToStakingPot<Runtime>>,
|
UsingComponents<WeightToFee, KsmLocation, AccountId, Balances, ToStakingPot<Runtime>>,
|
||||||
cumulus_primitives_utility::TakeFirstAssetTrader<
|
cumulus_primitives_utility::TakeFirstAssetTrader<
|
||||||
@@ -215,7 +218,7 @@ pub type XcmRouter = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
impl pallet_xcm::Config for Runtime {
|
impl pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<Origin, ()>;
|
type SendXcmOrigin = EnsureXcmOrigin<Origin, ()>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
@@ -226,17 +229,20 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Everything;
|
type XcmReserveTransferFilter = Everything;
|
||||||
type Weigher =
|
type Weigher = WeightInfoBounds<
|
||||||
WeightInfoBounds<crate::weights::xcm::StatemineXcmWeight<Call>, Call, MaxInstructions>;
|
crate::weights::xcm::StatemineXcmWeight<RuntimeCall>,
|
||||||
|
RuntimeCall,
|
||||||
|
MaxInstructions,
|
||||||
|
>;
|
||||||
|
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
||||||
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_xcm::Config for Runtime {
|
impl cumulus_pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,14 +159,14 @@ impl frame_system::Config for Runtime {
|
|||||||
type BlockWeights = RuntimeBlockWeights;
|
type BlockWeights = RuntimeBlockWeights;
|
||||||
type BlockLength = RuntimeBlockLength;
|
type BlockLength = RuntimeBlockLength;
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||||
type Index = Index;
|
type Index = Index;
|
||||||
type BlockNumber = BlockNumber;
|
type BlockNumber = BlockNumber;
|
||||||
type Hash = Hash;
|
type Hash = Hash;
|
||||||
type Hashing = BlakeTwo256;
|
type Hashing = BlakeTwo256;
|
||||||
type Header = Header;
|
type Header = Header;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type DbWeight = RocksDbWeight;
|
type DbWeight = RocksDbWeight;
|
||||||
@@ -215,7 +215,7 @@ impl pallet_balances::Config for Runtime {
|
|||||||
/// The type for recording an account's balance.
|
/// The type for recording an account's balance.
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ExistentialDeposit;
|
type ExistentialDeposit = ExistentialDeposit;
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
@@ -231,7 +231,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnChargeTransaction =
|
type OnChargeTransaction =
|
||||||
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
|
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
|
||||||
type WeightToFee = WeightToFee;
|
type WeightToFee = WeightToFee;
|
||||||
@@ -257,7 +257,7 @@ pub type AssetsForceOrigin =
|
|||||||
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<DotLocation, ExecutiveBody>>>;
|
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<DotLocation, ExecutiveBody>>>;
|
||||||
|
|
||||||
impl pallet_assets::Config for Runtime {
|
impl pallet_assets::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
type AssetId = AssetId;
|
type AssetId = AssetId;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
@@ -282,8 +282,8 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_multisig::Config for Runtime {
|
impl pallet_multisig::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type DepositBase = DepositBase;
|
type DepositBase = DepositBase;
|
||||||
type DepositFactor = DepositFactor;
|
type DepositFactor = DepositFactor;
|
||||||
@@ -292,8 +292,8 @@ impl pallet_multisig::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_utility::Config for Runtime {
|
impl pallet_utility::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type PalletsOrigin = OriginCaller;
|
type PalletsOrigin = OriginCaller;
|
||||||
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
@@ -345,65 +345,75 @@ impl Default for ProxyType {
|
|||||||
Self::Any
|
Self::Any
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl InstanceFilter<Call> for ProxyType {
|
impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||||
fn filter(&self, c: &Call) -> bool {
|
fn filter(&self, c: &RuntimeCall) -> bool {
|
||||||
match self {
|
match self {
|
||||||
ProxyType::Any => true,
|
ProxyType::Any => true,
|
||||||
ProxyType::NonTransfer =>
|
ProxyType::NonTransfer => !matches!(
|
||||||
!matches!(c, Call::Balances { .. } | Call::Assets { .. } | Call::Uniques { .. }),
|
c,
|
||||||
|
RuntimeCall::Balances { .. } |
|
||||||
|
RuntimeCall::Assets { .. } |
|
||||||
|
RuntimeCall::Uniques { .. }
|
||||||
|
),
|
||||||
ProxyType::CancelProxy => matches!(
|
ProxyType::CancelProxy => matches!(
|
||||||
c,
|
c,
|
||||||
Call::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
|
RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
|
||||||
Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
ProxyType::Assets => {
|
ProxyType::Assets => {
|
||||||
matches!(
|
matches!(
|
||||||
c,
|
c,
|
||||||
Call::Assets { .. } |
|
RuntimeCall::Assets { .. } |
|
||||||
Call::Utility { .. } | Call::Multisig { .. } |
|
RuntimeCall::Utility { .. } |
|
||||||
Call::Uniques { .. }
|
RuntimeCall::Multisig { .. } |
|
||||||
|
RuntimeCall::Uniques { .. }
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
ProxyType::AssetOwner => matches!(
|
ProxyType::AssetOwner => matches!(
|
||||||
c,
|
c,
|
||||||
Call::Assets(pallet_assets::Call::create { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::create { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::destroy { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::destroy { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::transfer_ownership { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::transfer_ownership { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::set_team { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::set_team { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::set_metadata { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::set_metadata { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::clear_metadata { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::clear_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::create { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::create { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::destroy { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::destroy { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_team { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_team { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_metadata { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_attribute { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_attribute { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::clear_metadata { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::clear_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::clear_attribute { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::clear_attribute { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_collection_max_supply { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_collection_max_supply { .. }) |
|
||||||
Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
ProxyType::AssetManager => matches!(
|
ProxyType::AssetManager => matches!(
|
||||||
c,
|
c,
|
||||||
Call::Assets(pallet_assets::Call::mint { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::mint { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::burn { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::burn { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::freeze { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::freeze { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::thaw { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::thaw { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::freeze_asset { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::freeze_asset { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::thaw_asset { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::thaw_asset { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::mint { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::mint { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::burn { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::burn { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::freeze { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::freeze { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::thaw { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::thaw { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::freeze_collection { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::freeze_collection { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::thaw_collection { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::thaw_collection { .. }) |
|
||||||
Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
ProxyType::Collator => matches!(
|
ProxyType::Collator => matches!(
|
||||||
c,
|
c,
|
||||||
Call::CollatorSelection { .. } | Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::CollatorSelection { .. } |
|
||||||
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -422,8 +432,8 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_proxy::Config for Runtime {
|
impl pallet_proxy::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type ProxyType = ProxyType;
|
type ProxyType = ProxyType;
|
||||||
type ProxyDepositBase = ProxyDepositBase;
|
type ProxyDepositBase = ProxyDepositBase;
|
||||||
@@ -442,7 +452,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Runtime {
|
impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = ();
|
type OnSystemEvent = ();
|
||||||
type SelfParaId = parachain_info::Pallet<Runtime>;
|
type SelfParaId = parachain_info::Pallet<Runtime>;
|
||||||
type DmpMessageHandler = DmpQueue;
|
type DmpMessageHandler = DmpQueue;
|
||||||
@@ -458,7 +468,7 @@ impl parachain_info::Config for Runtime {}
|
|||||||
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
||||||
|
|
||||||
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ChannelInfo = ParachainSystem;
|
type ChannelInfo = ParachainSystem;
|
||||||
type VersionWrapper = PolkadotXcm;
|
type VersionWrapper = PolkadotXcm;
|
||||||
@@ -472,7 +482,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
||||||
}
|
}
|
||||||
@@ -484,7 +494,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_session::Config for Runtime {
|
impl pallet_session::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
||||||
// we don't have stash and controller, thus we don't need the convert as well.
|
// we don't have stash and controller, thus we don't need the convert as well.
|
||||||
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
||||||
@@ -516,7 +526,7 @@ pub type CollatorSelectionUpdateOrigin =
|
|||||||
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<DotLocation, ExecutiveBody>>>;
|
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<DotLocation, ExecutiveBody>>>;
|
||||||
|
|
||||||
impl pallet_collator_selection::Config for Runtime {
|
impl pallet_collator_selection::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
||||||
type PotId = PotId;
|
type PotId = PotId;
|
||||||
@@ -532,7 +542,7 @@ impl pallet_collator_selection::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_asset_tx_payment::Config for Runtime {
|
impl pallet_asset_tx_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Fungibles = Assets;
|
type Fungibles = Assets;
|
||||||
type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
|
type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
|
||||||
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
|
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
|
||||||
@@ -552,7 +562,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_uniques::Config for Runtime {
|
impl pallet_uniques::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type CollectionId = u32;
|
type CollectionId = u32;
|
||||||
type ItemId = u32;
|
type ItemId = u32;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
@@ -637,9 +647,10 @@ pub type SignedExtra = (
|
|||||||
pallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>,
|
pallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>,
|
||||||
);
|
);
|
||||||
/// Unchecked extrinsic type as expected by this runtime.
|
/// Unchecked extrinsic type as expected by this runtime.
|
||||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
pub type UncheckedExtrinsic =
|
||||||
|
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||||
/// Extrinsic type that has already been checked.
|
/// Extrinsic type that has already been checked.
|
||||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
|
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
|
||||||
/// Executive: handles dispatch to the various modules.
|
/// Executive: handles dispatch to the various modules.
|
||||||
pub type Executive = frame_executive::Executive<
|
pub type Executive = frame_executive::Executive<
|
||||||
Runtime,
|
Runtime,
|
||||||
@@ -775,17 +786,17 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
|
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||||
for Runtime
|
for Runtime
|
||||||
{
|
{
|
||||||
fn query_call_info(
|
fn query_call_info(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||||
TransactionPayment::query_call_info(call, len)
|
TransactionPayment::query_call_info(call, len)
|
||||||
}
|
}
|
||||||
fn query_call_fee_details(
|
fn query_call_fee_details(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||||
TransactionPayment::query_call_fee_details(call, len)
|
TransactionPayment::query_call_fee_details(call, len)
|
||||||
@@ -917,7 +928,7 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_xcm_benchmarks::generic::Config for Runtime {
|
impl pallet_xcm_benchmarks::generic::Config for Runtime {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
|
|
||||||
fn worst_case_response() -> (u64, Response) {
|
fn worst_case_response() -> (u64, Response) {
|
||||||
(0u64, Response::Version(Default::default()))
|
(0u64, Response::Version(Default::default()))
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
AccountId, AssetId, Assets, Authorship, Balance, Balances, Call, Event, Origin, ParachainInfo,
|
AccountId, AssetId, Assets, Authorship, Balance, Balances, Origin, ParachainInfo,
|
||||||
ParachainSystem, PolkadotXcm, Runtime, WeightToFee, XcmpQueue,
|
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, WeightToFee, XcmpQueue,
|
||||||
};
|
};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
match_types, parameter_types,
|
match_types, parameter_types,
|
||||||
@@ -156,7 +156,7 @@ pub type Barrier = DenyThenTry<
|
|||||||
|
|
||||||
pub struct XcmConfig;
|
pub struct XcmConfig;
|
||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
type AssetTransactor = AssetTransactors;
|
type AssetTransactor = AssetTransactors;
|
||||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||||
@@ -167,8 +167,11 @@ impl xcm_executor::Config for XcmConfig {
|
|||||||
type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of DOT
|
type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of DOT
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Barrier = Barrier;
|
type Barrier = Barrier;
|
||||||
type Weigher =
|
type Weigher = WeightInfoBounds<
|
||||||
WeightInfoBounds<crate::weights::xcm::StatemintXcmWeight<Call>, Call, MaxInstructions>;
|
crate::weights::xcm::StatemintXcmWeight<RuntimeCall>,
|
||||||
|
RuntimeCall,
|
||||||
|
MaxInstructions,
|
||||||
|
>;
|
||||||
type Trader =
|
type Trader =
|
||||||
UsingComponents<WeightToFee, DotLocation, AccountId, Balances, ToStakingPot<Runtime>>;
|
UsingComponents<WeightToFee, DotLocation, AccountId, Balances, ToStakingPot<Runtime>>;
|
||||||
type ResponseHandler = PolkadotXcm;
|
type ResponseHandler = PolkadotXcm;
|
||||||
@@ -191,7 +194,7 @@ pub type XcmRouter = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
impl pallet_xcm::Config for Runtime {
|
impl pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<Origin, ()>;
|
type SendXcmOrigin = EnsureXcmOrigin<Origin, ()>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
@@ -202,16 +205,19 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Everything;
|
type XcmReserveTransferFilter = Everything;
|
||||||
type Weigher =
|
type Weigher = WeightInfoBounds<
|
||||||
WeightInfoBounds<crate::weights::xcm::StatemintXcmWeight<Call>, Call, MaxInstructions>;
|
crate::weights::xcm::StatemintXcmWeight<RuntimeCall>,
|
||||||
|
RuntimeCall,
|
||||||
|
MaxInstructions,
|
||||||
|
>;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
||||||
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_xcm::Config for Runtime {
|
impl cumulus_pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,14 +127,14 @@ impl frame_system::Config for Runtime {
|
|||||||
type BlockWeights = RuntimeBlockWeights;
|
type BlockWeights = RuntimeBlockWeights;
|
||||||
type BlockLength = RuntimeBlockLength;
|
type BlockLength = RuntimeBlockLength;
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||||
type Index = Index;
|
type Index = Index;
|
||||||
type BlockNumber = BlockNumber;
|
type BlockNumber = BlockNumber;
|
||||||
type Hash = Hash;
|
type Hash = Hash;
|
||||||
type Hashing = BlakeTwo256;
|
type Hashing = BlakeTwo256;
|
||||||
type Header = Header;
|
type Header = Header;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type DbWeight = RocksDbWeight;
|
type DbWeight = RocksDbWeight;
|
||||||
@@ -183,7 +183,7 @@ impl pallet_balances::Config for Runtime {
|
|||||||
/// The type for recording an account's balance.
|
/// The type for recording an account's balance.
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ExistentialDeposit;
|
type ExistentialDeposit = ExistentialDeposit;
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
@@ -199,7 +199,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnChargeTransaction =
|
type OnChargeTransaction =
|
||||||
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
|
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
|
||||||
type WeightToFee = WeightToFee;
|
type WeightToFee = WeightToFee;
|
||||||
@@ -222,7 +222,7 @@ parameter_types! {
|
|||||||
pub type AssetsForceOrigin = EnsureRoot<AccountId>;
|
pub type AssetsForceOrigin = EnsureRoot<AccountId>;
|
||||||
|
|
||||||
impl pallet_assets::Config for Runtime {
|
impl pallet_assets::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
type AssetId = AssetId;
|
type AssetId = AssetId;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
@@ -247,8 +247,8 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_multisig::Config for Runtime {
|
impl pallet_multisig::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type DepositBase = DepositBase;
|
type DepositBase = DepositBase;
|
||||||
type DepositFactor = DepositFactor;
|
type DepositFactor = DepositFactor;
|
||||||
@@ -257,8 +257,8 @@ impl pallet_multisig::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_utility::Config for Runtime {
|
impl pallet_utility::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type PalletsOrigin = OriginCaller;
|
type PalletsOrigin = OriginCaller;
|
||||||
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
@@ -310,65 +310,75 @@ impl Default for ProxyType {
|
|||||||
Self::Any
|
Self::Any
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl InstanceFilter<Call> for ProxyType {
|
impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||||
fn filter(&self, c: &Call) -> bool {
|
fn filter(&self, c: &RuntimeCall) -> bool {
|
||||||
match self {
|
match self {
|
||||||
ProxyType::Any => true,
|
ProxyType::Any => true,
|
||||||
ProxyType::NonTransfer =>
|
ProxyType::NonTransfer => !matches!(
|
||||||
!matches!(c, Call::Balances { .. } | Call::Assets { .. } | Call::Uniques { .. }),
|
c,
|
||||||
|
RuntimeCall::Balances { .. } |
|
||||||
|
RuntimeCall::Assets { .. } |
|
||||||
|
RuntimeCall::Uniques { .. }
|
||||||
|
),
|
||||||
ProxyType::CancelProxy => matches!(
|
ProxyType::CancelProxy => matches!(
|
||||||
c,
|
c,
|
||||||
Call::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
|
RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
|
||||||
Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
ProxyType::Assets => {
|
ProxyType::Assets => {
|
||||||
matches!(
|
matches!(
|
||||||
c,
|
c,
|
||||||
Call::Assets { .. } |
|
RuntimeCall::Assets { .. } |
|
||||||
Call::Utility { .. } | Call::Multisig { .. } |
|
RuntimeCall::Utility { .. } |
|
||||||
Call::Uniques { .. }
|
RuntimeCall::Multisig { .. } |
|
||||||
|
RuntimeCall::Uniques { .. }
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
ProxyType::AssetOwner => matches!(
|
ProxyType::AssetOwner => matches!(
|
||||||
c,
|
c,
|
||||||
Call::Assets(pallet_assets::Call::create { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::create { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::destroy { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::destroy { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::transfer_ownership { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::transfer_ownership { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::set_team { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::set_team { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::set_metadata { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::set_metadata { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::clear_metadata { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::clear_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::create { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::create { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::destroy { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::destroy { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_team { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_team { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_metadata { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_attribute { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_attribute { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::clear_metadata { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::clear_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::clear_attribute { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::clear_attribute { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::set_collection_max_supply { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::set_collection_max_supply { .. }) |
|
||||||
Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
ProxyType::AssetManager => matches!(
|
ProxyType::AssetManager => matches!(
|
||||||
c,
|
c,
|
||||||
Call::Assets(pallet_assets::Call::mint { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::mint { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::burn { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::burn { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::freeze { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::freeze { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::thaw { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::thaw { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::freeze_asset { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::freeze_asset { .. }) |
|
||||||
Call::Assets(pallet_assets::Call::thaw_asset { .. }) |
|
RuntimeCall::Assets(pallet_assets::Call::thaw_asset { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::mint { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::mint { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::burn { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::burn { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::freeze { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::freeze { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::thaw { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::thaw { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::freeze_collection { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::freeze_collection { .. }) |
|
||||||
Call::Uniques(pallet_uniques::Call::thaw_collection { .. }) |
|
RuntimeCall::Uniques(pallet_uniques::Call::thaw_collection { .. }) |
|
||||||
Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
ProxyType::Collator => matches!(
|
ProxyType::Collator => matches!(
|
||||||
c,
|
c,
|
||||||
Call::CollatorSelection { .. } | Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::CollatorSelection { .. } |
|
||||||
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -387,8 +397,8 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_proxy::Config for Runtime {
|
impl pallet_proxy::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type ProxyType = ProxyType;
|
type ProxyType = ProxyType;
|
||||||
type ProxyDepositBase = ProxyDepositBase;
|
type ProxyDepositBase = ProxyDepositBase;
|
||||||
@@ -407,7 +417,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Runtime {
|
impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = ();
|
type OnSystemEvent = ();
|
||||||
type SelfParaId = parachain_info::Pallet<Runtime>;
|
type SelfParaId = parachain_info::Pallet<Runtime>;
|
||||||
type OutboundXcmpMessageSource = XcmpQueue;
|
type OutboundXcmpMessageSource = XcmpQueue;
|
||||||
@@ -423,7 +433,7 @@ impl parachain_info::Config for Runtime {}
|
|||||||
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
||||||
|
|
||||||
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ChannelInfo = ParachainSystem;
|
type ChannelInfo = ParachainSystem;
|
||||||
type VersionWrapper = PolkadotXcm;
|
type VersionWrapper = PolkadotXcm;
|
||||||
@@ -434,7 +444,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
||||||
}
|
}
|
||||||
@@ -446,7 +456,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_session::Config for Runtime {
|
impl pallet_session::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
||||||
// we don't have stash and controller, thus we don't need the convert as well.
|
// we don't have stash and controller, thus we don't need the convert as well.
|
||||||
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
||||||
@@ -476,7 +486,7 @@ parameter_types! {
|
|||||||
pub type CollatorSelectionUpdateOrigin = EnsureRoot<AccountId>;
|
pub type CollatorSelectionUpdateOrigin = EnsureRoot<AccountId>;
|
||||||
|
|
||||||
impl pallet_collator_selection::Config for Runtime {
|
impl pallet_collator_selection::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
||||||
type PotId = PotId;
|
type PotId = PotId;
|
||||||
@@ -492,7 +502,7 @@ impl pallet_collator_selection::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_asset_tx_payment::Config for Runtime {
|
impl pallet_asset_tx_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Fungibles = Assets;
|
type Fungibles = Assets;
|
||||||
type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
|
type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
|
||||||
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
|
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
|
||||||
@@ -512,7 +522,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_uniques::Config for Runtime {
|
impl pallet_uniques::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type CollectionId = u32;
|
type CollectionId = u32;
|
||||||
type ItemId = u32;
|
type ItemId = u32;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
@@ -597,9 +607,10 @@ pub type SignedExtra = (
|
|||||||
pallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>,
|
pallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>,
|
||||||
);
|
);
|
||||||
/// Unchecked extrinsic type as expected by this runtime.
|
/// Unchecked extrinsic type as expected by this runtime.
|
||||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
pub type UncheckedExtrinsic =
|
||||||
|
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||||
/// Extrinsic type that has already been checked.
|
/// Extrinsic type that has already been checked.
|
||||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
|
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
|
||||||
/// Executive: handles dispatch to the various modules.
|
/// Executive: handles dispatch to the various modules.
|
||||||
pub type Executive = frame_executive::Executive<
|
pub type Executive = frame_executive::Executive<
|
||||||
Runtime,
|
Runtime,
|
||||||
@@ -736,17 +747,17 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
|
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||||
for Runtime
|
for Runtime
|
||||||
{
|
{
|
||||||
fn query_call_info(
|
fn query_call_info(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||||
TransactionPayment::query_call_info(call, len)
|
TransactionPayment::query_call_info(call, len)
|
||||||
}
|
}
|
||||||
fn query_call_fee_details(
|
fn query_call_fee_details(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||||
TransactionPayment::query_call_fee_details(call, len)
|
TransactionPayment::query_call_fee_details(call, len)
|
||||||
@@ -878,7 +889,7 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_xcm_benchmarks::generic::Config for Runtime {
|
impl pallet_xcm_benchmarks::generic::Config for Runtime {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
|
|
||||||
fn worst_case_response() -> (u64, Response) {
|
fn worst_case_response() -> (u64, Response) {
|
||||||
(0u64, Response::Version(Default::default()))
|
(0u64, Response::Version(Default::default()))
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
AccountId, AssetId, Assets, Authorship, Balance, Balances, Call, Event, Origin, ParachainInfo,
|
AccountId, AssetId, Assets, Authorship, Balance, Balances, Origin, ParachainInfo,
|
||||||
ParachainSystem, PolkadotXcm, Runtime, WeightToFee, XcmpQueue,
|
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, WeightToFee, XcmpQueue,
|
||||||
};
|
};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
match_types, parameter_types,
|
match_types, parameter_types,
|
||||||
@@ -156,7 +156,7 @@ pub type Barrier = DenyThenTry<
|
|||||||
|
|
||||||
pub struct XcmConfig;
|
pub struct XcmConfig;
|
||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
type AssetTransactor = AssetTransactors;
|
type AssetTransactor = AssetTransactors;
|
||||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||||
@@ -167,8 +167,11 @@ impl xcm_executor::Config for XcmConfig {
|
|||||||
type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of WND
|
type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of WND
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Barrier = Barrier;
|
type Barrier = Barrier;
|
||||||
type Weigher =
|
type Weigher = WeightInfoBounds<
|
||||||
WeightInfoBounds<crate::weights::xcm::WestmintXcmWeight<Call>, Call, MaxInstructions>;
|
crate::weights::xcm::WestmintXcmWeight<RuntimeCall>,
|
||||||
|
RuntimeCall,
|
||||||
|
MaxInstructions,
|
||||||
|
>;
|
||||||
type Trader = (
|
type Trader = (
|
||||||
UsingComponents<WeightToFee, WestendLocation, AccountId, Balances, ToStakingPot<Runtime>>,
|
UsingComponents<WeightToFee, WestendLocation, AccountId, Balances, ToStakingPot<Runtime>>,
|
||||||
cumulus_primitives_utility::TakeFirstAssetTrader<
|
cumulus_primitives_utility::TakeFirstAssetTrader<
|
||||||
@@ -211,7 +214,7 @@ pub type XcmRouter = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
impl pallet_xcm::Config for Runtime {
|
impl pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
type SendXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||||
@@ -219,16 +222,19 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Everything;
|
type XcmReserveTransferFilter = Everything;
|
||||||
type Weigher =
|
type Weigher = WeightInfoBounds<
|
||||||
WeightInfoBounds<crate::weights::xcm::WestmintXcmWeight<Call>, Call, MaxInstructions>;
|
crate::weights::xcm::WestmintXcmWeight<RuntimeCall>,
|
||||||
|
RuntimeCall,
|
||||||
|
MaxInstructions,
|
||||||
|
>;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
||||||
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_xcm::Config for Runtime {
|
impl cumulus_pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,14 +152,14 @@ impl frame_system::Config for Runtime {
|
|||||||
type BlockWeights = RuntimeBlockWeights;
|
type BlockWeights = RuntimeBlockWeights;
|
||||||
type BlockLength = RuntimeBlockLength;
|
type BlockLength = RuntimeBlockLength;
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||||
type Index = Index;
|
type Index = Index;
|
||||||
type BlockNumber = BlockNumber;
|
type BlockNumber = BlockNumber;
|
||||||
type Hash = Hash;
|
type Hash = Hash;
|
||||||
type Hashing = BlakeTwo256;
|
type Hashing = BlakeTwo256;
|
||||||
type Header = Header;
|
type Header = Header;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type DbWeight = RocksDbWeight;
|
type DbWeight = RocksDbWeight;
|
||||||
@@ -200,7 +200,7 @@ impl pallet_balances::Config for Runtime {
|
|||||||
/// The type for recording an account's balance.
|
/// The type for recording an account's balance.
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ExistentialDeposit;
|
type ExistentialDeposit = ExistentialDeposit;
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
@@ -215,7 +215,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnChargeTransaction =
|
type OnChargeTransaction =
|
||||||
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
|
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
|
||||||
type WeightToFee = WeightToFee;
|
type WeightToFee = WeightToFee;
|
||||||
@@ -232,8 +232,8 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_multisig::Config for Runtime {
|
impl pallet_multisig::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type DepositBase = DepositBase;
|
type DepositBase = DepositBase;
|
||||||
type DepositFactor = DepositFactor;
|
type DepositFactor = DepositFactor;
|
||||||
@@ -242,8 +242,8 @@ impl pallet_multisig::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_utility::Config for Runtime {
|
impl pallet_utility::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type PalletsOrigin = OriginCaller;
|
type PalletsOrigin = OriginCaller;
|
||||||
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
@@ -289,25 +289,29 @@ impl Default for ProxyType {
|
|||||||
Self::Any
|
Self::Any
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl InstanceFilter<Call> for ProxyType {
|
impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||||
fn filter(&self, c: &Call) -> bool {
|
fn filter(&self, c: &RuntimeCall) -> bool {
|
||||||
match self {
|
match self {
|
||||||
ProxyType::Any => true,
|
ProxyType::Any => true,
|
||||||
ProxyType::NonTransfer => !matches!(c, Call::Balances { .. }),
|
ProxyType::NonTransfer => !matches!(c, RuntimeCall::Balances { .. }),
|
||||||
ProxyType::CancelProxy => matches!(
|
ProxyType::CancelProxy => matches!(
|
||||||
c,
|
c,
|
||||||
Call::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
|
RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
|
||||||
Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
ProxyType::Collator => matches!(
|
ProxyType::Collator => matches!(
|
||||||
c,
|
c,
|
||||||
Call::CollatorSelection { .. } | Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::CollatorSelection { .. } |
|
||||||
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
ProxyType::Alliance => matches!(
|
ProxyType::Alliance => matches!(
|
||||||
c,
|
c,
|
||||||
Call::AllianceMotion { .. } |
|
RuntimeCall::AllianceMotion { .. } |
|
||||||
Call::Alliance { .. } |
|
RuntimeCall::Alliance { .. } |
|
||||||
Call::Utility { .. } | Call::Multisig { .. }
|
RuntimeCall::Utility { .. } |
|
||||||
|
RuntimeCall::Multisig { .. }
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -323,8 +327,8 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_proxy::Config for Runtime {
|
impl pallet_proxy::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type ProxyType = ProxyType;
|
type ProxyType = ProxyType;
|
||||||
type ProxyDepositBase = ProxyDepositBase;
|
type ProxyDepositBase = ProxyDepositBase;
|
||||||
@@ -343,7 +347,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Runtime {
|
impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = ();
|
type OnSystemEvent = ();
|
||||||
type SelfParaId = parachain_info::Pallet<Runtime>;
|
type SelfParaId = parachain_info::Pallet<Runtime>;
|
||||||
type DmpMessageHandler = DmpQueue;
|
type DmpMessageHandler = DmpQueue;
|
||||||
@@ -359,7 +363,7 @@ impl parachain_info::Config for Runtime {}
|
|||||||
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
||||||
|
|
||||||
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ChannelInfo = ParachainSystem;
|
type ChannelInfo = ParachainSystem;
|
||||||
type VersionWrapper = PolkadotXcm;
|
type VersionWrapper = PolkadotXcm;
|
||||||
@@ -370,7 +374,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
||||||
}
|
}
|
||||||
@@ -379,7 +383,7 @@ pub const PERIOD: u32 = 6 * HOURS;
|
|||||||
pub const OFFSET: u32 = 0;
|
pub const OFFSET: u32 = 0;
|
||||||
|
|
||||||
impl pallet_session::Config for Runtime {
|
impl pallet_session::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
||||||
// we don't have stash and controller, thus we don't need the convert as well.
|
// we don't have stash and controller, thus we don't need the convert as well.
|
||||||
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
||||||
@@ -408,7 +412,7 @@ parameter_types! {
|
|||||||
pub type CollatorSelectionUpdateOrigin = RootOrExecutiveSimpleMajority;
|
pub type CollatorSelectionUpdateOrigin = RootOrExecutiveSimpleMajority;
|
||||||
|
|
||||||
impl pallet_collator_selection::Config for Runtime {
|
impl pallet_collator_selection::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
||||||
type PotId = PotId;
|
type PotId = PotId;
|
||||||
@@ -434,8 +438,8 @@ pub const ALLIANCE_MAX_MEMBERS: u32 = 100;
|
|||||||
type AllianceCollective = pallet_collective::Instance1;
|
type AllianceCollective = pallet_collective::Instance1;
|
||||||
impl pallet_collective::Config<AllianceCollective> for Runtime {
|
impl pallet_collective::Config<AllianceCollective> for Runtime {
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Proposal = Call;
|
type Proposal = RuntimeCall;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type MotionDuration = AllianceMotionDuration;
|
type MotionDuration = AllianceMotionDuration;
|
||||||
type MaxProposals = ConstU32<ALLIANCE_MAX_PROPOSALS>;
|
type MaxProposals = ConstU32<ALLIANCE_MAX_PROPOSALS>;
|
||||||
type MaxMembers = ConstU32<ALLIANCE_MAX_MEMBERS>;
|
type MaxMembers = ConstU32<ALLIANCE_MAX_MEMBERS>;
|
||||||
@@ -458,8 +462,8 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_alliance::Config for Runtime {
|
impl pallet_alliance::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Proposal = Call;
|
type Proposal = RuntimeCall;
|
||||||
type AdminOrigin = RootOrAllianceTwoThirdsMajority;
|
type AdminOrigin = RootOrAllianceTwoThirdsMajority;
|
||||||
type MembershipManager = RootOrAllianceTwoThirdsMajority;
|
type MembershipManager = RootOrAllianceTwoThirdsMajority;
|
||||||
type AnnouncementOrigin = RootOrAllianceTwoThirdsMajority;
|
type AnnouncementOrigin = RootOrAllianceTwoThirdsMajority;
|
||||||
@@ -544,9 +548,10 @@ pub type SignedExtra = (
|
|||||||
frame_system::CheckWeight<Runtime>,
|
frame_system::CheckWeight<Runtime>,
|
||||||
);
|
);
|
||||||
/// Unchecked extrinsic type as expected by this runtime.
|
/// Unchecked extrinsic type as expected by this runtime.
|
||||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
pub type UncheckedExtrinsic =
|
||||||
|
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||||
/// Extrinsic type that has already been checked.
|
/// Extrinsic type that has already been checked.
|
||||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
|
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
|
||||||
/// Executive: handles dispatch to the various modules.
|
/// Executive: handles dispatch to the various modules.
|
||||||
pub type Executive = frame_executive::Executive<
|
pub type Executive = frame_executive::Executive<
|
||||||
Runtime,
|
Runtime,
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
AccountId, Balances, Call, Event, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime,
|
AccountId, Balances, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall,
|
||||||
WeightToFee, XcmpQueue,
|
RuntimeEvent, WeightToFee, XcmpQueue,
|
||||||
};
|
};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
match_types, parameter_types,
|
match_types, parameter_types,
|
||||||
@@ -132,7 +132,7 @@ pub type Barrier = DenyThenTry<
|
|||||||
|
|
||||||
pub struct XcmConfig;
|
pub struct XcmConfig;
|
||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
type AssetTransactor = CurrencyTransactor;
|
type AssetTransactor = CurrencyTransactor;
|
||||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||||
@@ -143,7 +143,7 @@ impl xcm_executor::Config for XcmConfig {
|
|||||||
type IsTeleporter = ConcreteNativeAssetFrom<DotLocation>;
|
type IsTeleporter = ConcreteNativeAssetFrom<DotLocation>;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Barrier = Barrier;
|
type Barrier = Barrier;
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||||
type Trader =
|
type Trader =
|
||||||
UsingComponents<WeightToFee, DotLocation, AccountId, Balances, ToStakingPot<Runtime>>;
|
UsingComponents<WeightToFee, DotLocation, AccountId, Balances, ToStakingPot<Runtime>>;
|
||||||
type ResponseHandler = PolkadotXcm;
|
type ResponseHandler = PolkadotXcm;
|
||||||
@@ -166,7 +166,7 @@ pub type XcmRouter = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
impl pallet_xcm::Config for Runtime {
|
impl pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<Origin, ()>;
|
type SendXcmOrigin = EnsureXcmOrigin<Origin, ()>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
@@ -177,15 +177,15 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
||||||
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_xcm::Config for Runtime {
|
impl cumulus_pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
constants::currency::deposit, Balance, Balances, Call, Event, RandomnessCollectiveFlip,
|
constants::currency::deposit, Balance, Balances, RandomnessCollectiveFlip, Runtime,
|
||||||
Runtime, RuntimeBlockWeights, Timestamp,
|
RuntimeBlockWeights, RuntimeCall, RuntimeEvent, Timestamp,
|
||||||
};
|
};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
parameter_types,
|
parameter_types,
|
||||||
@@ -37,8 +37,8 @@ impl Config for Runtime {
|
|||||||
type Time = Timestamp;
|
type Time = Timestamp;
|
||||||
type Randomness = RandomnessCollectiveFlip;
|
type Randomness = RandomnessCollectiveFlip;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
/// The safest default is to allow no calls at all.
|
/// The safest default is to allow no calls at all.
|
||||||
///
|
///
|
||||||
/// Runtimes should whitelist dispatchables that are allowed to be called from contracts
|
/// Runtimes should whitelist dispatchables that are allowed to be called from contracts
|
||||||
|
|||||||
@@ -89,9 +89,10 @@ pub type SignedExtra = (
|
|||||||
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
|
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
|
||||||
);
|
);
|
||||||
/// Unchecked extrinsic type as expected by this runtime.
|
/// Unchecked extrinsic type as expected by this runtime.
|
||||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
pub type UncheckedExtrinsic =
|
||||||
|
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||||
/// Extrinsic type that has already been checked.
|
/// Extrinsic type that has already been checked.
|
||||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
|
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
|
||||||
/// Executive: handles dispatch to the various modules.
|
/// Executive: handles dispatch to the various modules.
|
||||||
pub type Executive = frame_executive::Executive<
|
pub type Executive = frame_executive::Executive<
|
||||||
Runtime,
|
Runtime,
|
||||||
@@ -156,14 +157,14 @@ impl frame_system::Config for Runtime {
|
|||||||
type BlockWeights = RuntimeBlockWeights;
|
type BlockWeights = RuntimeBlockWeights;
|
||||||
type BlockLength = RuntimeBlockLength;
|
type BlockLength = RuntimeBlockLength;
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||||
type Index = Index;
|
type Index = Index;
|
||||||
type BlockNumber = BlockNumber;
|
type BlockNumber = BlockNumber;
|
||||||
type Hash = Hash;
|
type Hash = Hash;
|
||||||
type Hashing = BlakeTwo256;
|
type Hashing = BlakeTwo256;
|
||||||
type Header = Header;
|
type Header = Header;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type DbWeight = RocksDbWeight;
|
type DbWeight = RocksDbWeight;
|
||||||
@@ -198,7 +199,7 @@ impl pallet_balances::Config for Runtime {
|
|||||||
/// The type for recording an account's balance.
|
/// The type for recording an account's balance.
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ConstU128<EXISTENTIAL_DEPOSIT>;
|
type ExistentialDeposit = ConstU128<EXISTENTIAL_DEPOSIT>;
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
@@ -208,7 +209,7 @@ impl pallet_balances::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnChargeTransaction =
|
type OnChargeTransaction =
|
||||||
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
|
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
|
||||||
type WeightToFee = WeightToFee;
|
type WeightToFee = WeightToFee;
|
||||||
@@ -226,8 +227,8 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_multisig::Config for Runtime {
|
impl pallet_multisig::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type DepositBase = DepositBase;
|
type DepositBase = DepositBase;
|
||||||
type DepositFactor = DepositFactor;
|
type DepositFactor = DepositFactor;
|
||||||
@@ -236,8 +237,8 @@ impl pallet_multisig::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_utility::Config for Runtime {
|
impl pallet_utility::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type PalletsOrigin = OriginCaller;
|
type PalletsOrigin = OriginCaller;
|
||||||
type WeightInfo = pallet_utility::weights::SubstrateWeight<Runtime>;
|
type WeightInfo = pallet_utility::weights::SubstrateWeight<Runtime>;
|
||||||
}
|
}
|
||||||
@@ -248,7 +249,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Runtime {
|
impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = ();
|
type OnSystemEvent = ();
|
||||||
type SelfParaId = parachain_info::Pallet<Runtime>;
|
type SelfParaId = parachain_info::Pallet<Runtime>;
|
||||||
type DmpMessageHandler = DmpQueue;
|
type DmpMessageHandler = DmpQueue;
|
||||||
@@ -271,7 +272,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_session::Config for Runtime {
|
impl pallet_session::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
||||||
// we don't have stash and controller, thus we don't need the convert as well.
|
// we don't have stash and controller, thus we don't need the convert as well.
|
||||||
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
||||||
@@ -295,7 +296,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_collator_selection::Config for Runtime {
|
impl pallet_collator_selection::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
||||||
type PotId = PotId;
|
type PotId = PotId;
|
||||||
@@ -311,8 +312,8 @@ impl pallet_collator_selection::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_sudo::Config for Runtime {
|
impl pallet_sudo::Config for Runtime {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the runtime by composing the FRAME pallets that were previously configured.
|
// Create the runtime by composing the FRAME pallets that were previously configured.
|
||||||
@@ -479,17 +480,17 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
|
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||||
for Runtime
|
for Runtime
|
||||||
{
|
{
|
||||||
fn query_call_info(
|
fn query_call_info(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||||
TransactionPayment::query_call_info(call, len)
|
TransactionPayment::query_call_info(call, len)
|
||||||
}
|
}
|
||||||
fn query_call_fee_details(
|
fn query_call_fee_details(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||||
TransactionPayment::query_call_fee_details(call, len)
|
TransactionPayment::query_call_fee_details(call, len)
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
AccountId, Balances, Call, Event, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime,
|
AccountId, Balances, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall,
|
||||||
WeightToFee, XcmpQueue,
|
RuntimeEvent, WeightToFee, XcmpQueue,
|
||||||
};
|
};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
match_types, parameter_types,
|
match_types, parameter_types,
|
||||||
@@ -135,7 +135,7 @@ pub type Barrier = DenyThenTry<
|
|||||||
|
|
||||||
pub struct XcmConfig;
|
pub struct XcmConfig;
|
||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
type AssetTransactor = CurrencyTransactor;
|
type AssetTransactor = CurrencyTransactor;
|
||||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||||
@@ -143,7 +143,7 @@ impl xcm_executor::Config for XcmConfig {
|
|||||||
type IsTeleporter = NativeAsset;
|
type IsTeleporter = NativeAsset;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Barrier = Barrier;
|
type Barrier = Barrier;
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||||
type Trader = UsingComponents<WeightToFee, RelayLocation, AccountId, Balances, ()>;
|
type Trader = UsingComponents<WeightToFee, RelayLocation, AccountId, Balances, ()>;
|
||||||
type ResponseHandler = PolkadotXcm;
|
type ResponseHandler = PolkadotXcm;
|
||||||
type AssetTrap = PolkadotXcm;
|
type AssetTrap = PolkadotXcm;
|
||||||
@@ -165,7 +165,7 @@ pub type XcmRouter = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
impl pallet_xcm::Config for Runtime {
|
impl pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<Origin, ()>;
|
type SendXcmOrigin = EnsureXcmOrigin<Origin, ()>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
@@ -176,21 +176,21 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Everything;
|
type XcmReserveTransferFilter = Everything;
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
||||||
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_xcm::Config for Runtime {
|
impl cumulus_pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ChannelInfo = ParachainSystem;
|
type ChannelInfo = ParachainSystem;
|
||||||
type VersionWrapper = PolkadotXcm;
|
type VersionWrapper = PolkadotXcm;
|
||||||
@@ -204,7 +204,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ impl frame_system::Config for Runtime {
|
|||||||
/// The identifier used to distinguish between accounts.
|
/// The identifier used to distinguish between accounts.
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
/// The aggregated dispatch type that is available for extrinsics.
|
/// The aggregated dispatch type that is available for extrinsics.
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||||
/// The index type for storing how many extrinsics an account has signed.
|
/// The index type for storing how many extrinsics an account has signed.
|
||||||
@@ -128,7 +128,7 @@ impl frame_system::Config for Runtime {
|
|||||||
/// The header type.
|
/// The header type.
|
||||||
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
/// The ubiquitous origin type.
|
/// The ubiquitous origin type.
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
||||||
@@ -151,16 +151,16 @@ impl frame_system::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_sudo::Config for Runtime {
|
impl pallet_sudo::Config for Runtime {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_solo_to_para::Config for Runtime {
|
impl cumulus_pallet_solo_to_para::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Runtime {
|
impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = cumulus_pallet_solo_to_para::Pallet<Runtime>;
|
type OnSystemEvent = cumulus_pallet_solo_to_para::Pallet<Runtime>;
|
||||||
type SelfParaId = parachain_info::Pallet<Runtime>;
|
type SelfParaId = parachain_info::Pallet<Runtime>;
|
||||||
type OutboundXcmpMessageSource = ();
|
type OutboundXcmpMessageSource = ();
|
||||||
@@ -216,9 +216,10 @@ pub type SignedExtra = (
|
|||||||
cumulus_pallet_solo_to_para::CheckSudo<Runtime>,
|
cumulus_pallet_solo_to_para::CheckSudo<Runtime>,
|
||||||
);
|
);
|
||||||
/// Unchecked extrinsic type as expected by this runtime.
|
/// Unchecked extrinsic type as expected by this runtime.
|
||||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
pub type UncheckedExtrinsic =
|
||||||
|
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||||
/// Extrinsic type that has already been checked.
|
/// Extrinsic type that has already been checked.
|
||||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
|
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
|
||||||
/// Executive: handles dispatch to the various modules.
|
/// Executive: handles dispatch to the various modules.
|
||||||
pub type Executive = frame_executive::Executive<
|
pub type Executive = frame_executive::Executive<
|
||||||
Runtime,
|
Runtime,
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ impl frame_system::Config for Runtime {
|
|||||||
/// The identifier used to distinguish between accounts.
|
/// The identifier used to distinguish between accounts.
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
/// The aggregated dispatch type that is available for extrinsics.
|
/// The aggregated dispatch type that is available for extrinsics.
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||||
/// The index type for storing how many extrinsics an account has signed.
|
/// The index type for storing how many extrinsics an account has signed.
|
||||||
@@ -136,7 +136,7 @@ impl frame_system::Config for Runtime {
|
|||||||
/// The header type.
|
/// The header type.
|
||||||
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
/// The ubiquitous origin type.
|
/// The ubiquitous origin type.
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
||||||
@@ -164,7 +164,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Runtime {
|
impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = ();
|
type OnSystemEvent = ();
|
||||||
type SelfParaId = parachain_info::Pallet<Runtime>;
|
type SelfParaId = parachain_info::Pallet<Runtime>;
|
||||||
type OutboundXcmpMessageSource = ();
|
type OutboundXcmpMessageSource = ();
|
||||||
@@ -200,7 +200,7 @@ pub struct DisallowSigned;
|
|||||||
impl sp_runtime::traits::SignedExtension for DisallowSigned {
|
impl sp_runtime::traits::SignedExtension for DisallowSigned {
|
||||||
const IDENTIFIER: &'static str = "DisallowSigned";
|
const IDENTIFIER: &'static str = "DisallowSigned";
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
type Call = Call;
|
type Call = RuntimeCall;
|
||||||
type AdditionalSigned = ();
|
type AdditionalSigned = ();
|
||||||
type Pre = ();
|
type Pre = ();
|
||||||
fn additional_signed(
|
fn additional_signed(
|
||||||
@@ -248,9 +248,10 @@ pub type BlockId = generic::BlockId<Block>;
|
|||||||
/// The SignedExtension to the basic transaction logic.
|
/// The SignedExtension to the basic transaction logic.
|
||||||
pub type SignedExtra = DisallowSigned;
|
pub type SignedExtra = DisallowSigned;
|
||||||
/// Unchecked extrinsic type as expected by this runtime.
|
/// Unchecked extrinsic type as expected by this runtime.
|
||||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
pub type UncheckedExtrinsic =
|
||||||
|
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||||
/// Extrinsic type that has already been checked.
|
/// Extrinsic type that has already been checked.
|
||||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
|
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
|
||||||
/// Executive: handles dispatch to the various modules.
|
/// Executive: handles dispatch to the various modules.
|
||||||
pub type Executive = frame_executive::Executive<
|
pub type Executive = frame_executive::Executive<
|
||||||
Runtime,
|
Runtime,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use super::{AccountId, Call, Event, Origin, ParachainInfo, Runtime};
|
use super::{AccountId, Origin, ParachainInfo, Runtime, RuntimeCall, RuntimeEvent};
|
||||||
use frame_support::{match_types, parameter_types};
|
use frame_support::{match_types, parameter_types};
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
@@ -52,7 +52,7 @@ parameter_types! {
|
|||||||
|
|
||||||
pub struct XcmConfig;
|
pub struct XcmConfig;
|
||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = (); // sending XCM not supported
|
type XcmSender = (); // sending XCM not supported
|
||||||
type AssetTransactor = (); // balances not supported
|
type AssetTransactor = (); // balances not supported
|
||||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||||
@@ -60,7 +60,7 @@ impl xcm_executor::Config for XcmConfig {
|
|||||||
type IsTeleporter = (); // balances not supported
|
type IsTeleporter = (); // balances not supported
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Barrier = AllowUnpaidExecutionFrom<JustTheParent>;
|
type Barrier = AllowUnpaidExecutionFrom<JustTheParent>;
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>; // balances not supported
|
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>; // balances not supported
|
||||||
type Trader = (); // balances not supported
|
type Trader = (); // balances not supported
|
||||||
type ResponseHandler = (); // Don't handle responses for now.
|
type ResponseHandler = (); // Don't handle responses for now.
|
||||||
type AssetTrap = (); // don't trap for now
|
type AssetTrap = (); // don't trap for now
|
||||||
@@ -69,6 +69,6 @@ impl xcm_executor::Config for XcmConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_xcm::Config for Runtime {
|
impl cumulus_pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = xcm_executor::XcmExecutor<XcmConfig>;
|
type XcmExecutor = xcm_executor::XcmExecutor<XcmConfig>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,10 +117,11 @@ pub type SignedExtra = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Unchecked extrinsic type as expected by this runtime.
|
/// Unchecked extrinsic type as expected by this runtime.
|
||||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
pub type UncheckedExtrinsic =
|
||||||
|
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||||
|
|
||||||
/// Extrinsic type that has already been checked.
|
/// Extrinsic type that has already been checked.
|
||||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
|
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
|
||||||
|
|
||||||
/// Executive: handles dispatch to the various modules.
|
/// Executive: handles dispatch to the various modules.
|
||||||
pub type Executive = frame_executive::Executive<
|
pub type Executive = frame_executive::Executive<
|
||||||
@@ -271,7 +272,7 @@ impl frame_system::Config for Runtime {
|
|||||||
/// The identifier used to distinguish between accounts.
|
/// The identifier used to distinguish between accounts.
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
/// The aggregated dispatch type that is available for extrinsics.
|
/// The aggregated dispatch type that is available for extrinsics.
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||||
/// The index type for storing how many extrinsics an account has signed.
|
/// The index type for storing how many extrinsics an account has signed.
|
||||||
@@ -285,7 +286,7 @@ impl frame_system::Config for Runtime {
|
|||||||
/// The header type.
|
/// The header type.
|
||||||
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
/// The ubiquitous origin type.
|
/// The ubiquitous origin type.
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
||||||
@@ -351,7 +352,7 @@ impl pallet_balances::Config for Runtime {
|
|||||||
/// The type for recording an account's balance.
|
/// The type for recording an account's balance.
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ExistentialDeposit;
|
type ExistentialDeposit = ExistentialDeposit;
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
@@ -367,7 +368,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
|
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
|
||||||
type WeightToFee = WeightToFee;
|
type WeightToFee = WeightToFee;
|
||||||
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
|
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
|
||||||
@@ -389,7 +390,7 @@ parameter_types! {
|
|||||||
// EnsureOneOf<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>>;
|
// EnsureOneOf<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>>;
|
||||||
|
|
||||||
impl pallet_assets::Config for Runtime {
|
impl pallet_assets::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
type AssetId = AssetId;
|
type AssetId = AssetId;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
@@ -411,7 +412,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Runtime {
|
impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = ();
|
type OnSystemEvent = ();
|
||||||
type SelfParaId = parachain_info::Pallet<Runtime>;
|
type SelfParaId = parachain_info::Pallet<Runtime>;
|
||||||
type DmpMessageHandler = DmpQueue;
|
type DmpMessageHandler = DmpQueue;
|
||||||
@@ -427,7 +428,7 @@ impl parachain_info::Config for Runtime {}
|
|||||||
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
||||||
|
|
||||||
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ChannelInfo = ParachainSystem;
|
type ChannelInfo = ParachainSystem;
|
||||||
type VersionWrapper = PolkadotXcm;
|
type VersionWrapper = PolkadotXcm;
|
||||||
@@ -438,7 +439,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
||||||
}
|
}
|
||||||
@@ -450,7 +451,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_session::Config for Runtime {
|
impl pallet_session::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
||||||
// we don't have stash and controller, thus we don't need the convert as well.
|
// we don't have stash and controller, thus we don't need the convert as well.
|
||||||
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
||||||
@@ -482,7 +483,7 @@ parameter_types! {
|
|||||||
pub type CollatorSelectionUpdateOrigin = EnsureRoot<AccountId>;
|
pub type CollatorSelectionUpdateOrigin = EnsureRoot<AccountId>;
|
||||||
|
|
||||||
impl pallet_collator_selection::Config for Runtime {
|
impl pallet_collator_selection::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
||||||
type PotId = PotId;
|
type PotId = PotId;
|
||||||
@@ -498,7 +499,7 @@ impl pallet_collator_selection::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_asset_tx_payment::Config for Runtime {
|
impl pallet_asset_tx_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Fungibles = Assets;
|
type Fungibles = Assets;
|
||||||
type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
|
type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
|
||||||
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
|
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
|
||||||
@@ -507,8 +508,8 @@ impl pallet_asset_tx_payment::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_sudo::Config for Runtime {
|
impl pallet_sudo::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the runtime by composing the FRAME pallets that were previously configured.
|
// Create the runtime by composing the FRAME pallets that were previously configured.
|
||||||
@@ -668,17 +669,17 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
|
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||||
for Runtime
|
for Runtime
|
||||||
{
|
{
|
||||||
fn query_call_info(
|
fn query_call_info(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||||
TransactionPayment::query_call_info(call, len)
|
TransactionPayment::query_call_info(call, len)
|
||||||
}
|
}
|
||||||
fn query_call_fee_details(
|
fn query_call_fee_details(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||||
TransactionPayment::query_call_fee_details(call, len)
|
TransactionPayment::query_call_fee_details(call, len)
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
//! with statemine as the reserve. At present no derivative tokens are minted on receipt of a
|
//! with statemine as the reserve. At present no derivative tokens are minted on receipt of a
|
||||||
//! ReserveAssetTransferDeposited message but that will but the intension will be to support this soon.
|
//! ReserveAssetTransferDeposited message but that will but the intension will be to support this soon.
|
||||||
use super::{
|
use super::{
|
||||||
AccountId, AssetId as AssetIdPalletAssets, Assets, Balance, Balances, Call, Event, Origin,
|
AccountId, AssetId as AssetIdPalletAssets, Assets, Balance, Balances, Origin, ParachainInfo,
|
||||||
ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, WeightToFee, XcmpQueue,
|
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, WeightToFee, XcmpQueue,
|
||||||
};
|
};
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
@@ -161,9 +161,9 @@ where
|
|||||||
Deny: ShouldExecute,
|
Deny: ShouldExecute,
|
||||||
Allow: ShouldExecute,
|
Allow: ShouldExecute,
|
||||||
{
|
{
|
||||||
fn should_execute<Call>(
|
fn should_execute<RuntimeCall>(
|
||||||
origin: &MultiLocation,
|
origin: &MultiLocation,
|
||||||
message: &mut Xcm<Call>,
|
message: &mut Xcm<RuntimeCall>,
|
||||||
max_weight: XCMWeight,
|
max_weight: XCMWeight,
|
||||||
weight_credit: &mut XCMWeight,
|
weight_credit: &mut XCMWeight,
|
||||||
) -> Result<(), ()> {
|
) -> Result<(), ()> {
|
||||||
@@ -175,9 +175,9 @@ where
|
|||||||
// See issue #5233
|
// See issue #5233
|
||||||
pub struct DenyReserveTransferToRelayChain;
|
pub struct DenyReserveTransferToRelayChain;
|
||||||
impl ShouldExecute for DenyReserveTransferToRelayChain {
|
impl ShouldExecute for DenyReserveTransferToRelayChain {
|
||||||
fn should_execute<Call>(
|
fn should_execute<RuntimeCall>(
|
||||||
origin: &MultiLocation,
|
origin: &MultiLocation,
|
||||||
message: &mut Xcm<Call>,
|
message: &mut Xcm<RuntimeCall>,
|
||||||
_max_weight: XCMWeight,
|
_max_weight: XCMWeight,
|
||||||
_weight_credit: &mut XCMWeight,
|
_weight_credit: &mut XCMWeight,
|
||||||
) -> Result<(), ()> {
|
) -> Result<(), ()> {
|
||||||
@@ -320,7 +320,7 @@ pub type Reserves = (NativeAsset, AssetsFrom<CommonGoodAssetsLocation>);
|
|||||||
|
|
||||||
pub struct XcmConfig;
|
pub struct XcmConfig;
|
||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
// How to withdraw and deposit an asset.
|
// How to withdraw and deposit an asset.
|
||||||
type AssetTransactor = AssetTransactors;
|
type AssetTransactor = AssetTransactors;
|
||||||
@@ -329,7 +329,7 @@ impl xcm_executor::Config for XcmConfig {
|
|||||||
type IsTeleporter = NativeAsset;
|
type IsTeleporter = NativeAsset;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Barrier = Barrier;
|
type Barrier = Barrier;
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||||
type Trader =
|
type Trader =
|
||||||
UsingComponents<WeightToFee, RelayLocation, AccountId, Balances, ToAuthor<Runtime>>;
|
UsingComponents<WeightToFee, RelayLocation, AccountId, Balances, ToAuthor<Runtime>>;
|
||||||
type ResponseHandler = PolkadotXcm;
|
type ResponseHandler = PolkadotXcm;
|
||||||
@@ -351,7 +351,7 @@ pub type XcmRouter = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
impl pallet_xcm::Config for Runtime {
|
impl pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
type SendXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||||
@@ -361,10 +361,10 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Everything;
|
type XcmReserveTransferFilter = Everything;
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
|
|
||||||
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
||||||
// ^ Override for AdvertisedXcmVersion default
|
// ^ Override for AdvertisedXcmVersion default
|
||||||
@@ -372,6 +372,6 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_xcm::Config for Runtime {
|
impl cumulus_pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ impl frame_system::Config for Runtime {
|
|||||||
/// The identifier used to distinguish between accounts.
|
/// The identifier used to distinguish between accounts.
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
/// The aggregated dispatch type that is available for extrinsics.
|
/// The aggregated dispatch type that is available for extrinsics.
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||||
/// The index type for storing how many extrinsics an account has signed.
|
/// The index type for storing how many extrinsics an account has signed.
|
||||||
@@ -178,7 +178,7 @@ impl frame_system::Config for Runtime {
|
|||||||
/// The header type.
|
/// The header type.
|
||||||
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
/// The ubiquitous origin type.
|
/// The ubiquitous origin type.
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
||||||
@@ -225,7 +225,7 @@ impl pallet_balances::Config for Runtime {
|
|||||||
/// The type for recording an account's balance.
|
/// The type for recording an account's balance.
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ExistentialDeposit;
|
type ExistentialDeposit = ExistentialDeposit;
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
@@ -240,7 +240,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
|
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
|
||||||
type WeightToFee = IdentityFee<Balance>;
|
type WeightToFee = IdentityFee<Balance>;
|
||||||
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
|
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
|
||||||
@@ -249,8 +249,8 @@ impl pallet_transaction_payment::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_sudo::Config for Runtime {
|
impl pallet_sudo::Config for Runtime {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
@@ -259,7 +259,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Runtime {
|
impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = ();
|
type OnSystemEvent = ();
|
||||||
type SelfParaId = parachain_info::Pallet<Runtime>;
|
type SelfParaId = parachain_info::Pallet<Runtime>;
|
||||||
type OutboundXcmpMessageSource = XcmpQueue;
|
type OutboundXcmpMessageSource = XcmpQueue;
|
||||||
@@ -398,7 +398,7 @@ pub type Reserves = (NativeAsset, AssetsFrom<StatemintLocation>);
|
|||||||
|
|
||||||
pub struct XcmConfig;
|
pub struct XcmConfig;
|
||||||
impl Config for XcmConfig {
|
impl Config for XcmConfig {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
// How to withdraw and deposit an asset.
|
// How to withdraw and deposit an asset.
|
||||||
type AssetTransactor = AssetTransactors;
|
type AssetTransactor = AssetTransactors;
|
||||||
@@ -407,7 +407,7 @@ impl Config for XcmConfig {
|
|||||||
type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of ROC
|
type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of ROC
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Barrier = Barrier;
|
type Barrier = Barrier;
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||||
type Trader = UsingComponents<IdentityFee<Balance>, RocLocation, AccountId, Balances, ()>;
|
type Trader = UsingComponents<IdentityFee<Balance>, RocLocation, AccountId, Balances, ()>;
|
||||||
type ResponseHandler = PolkadotXcm;
|
type ResponseHandler = PolkadotXcm;
|
||||||
type AssetTrap = PolkadotXcm;
|
type AssetTrap = PolkadotXcm;
|
||||||
@@ -428,7 +428,7 @@ pub type XcmRouter = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
impl pallet_xcm::Config for Runtime {
|
impl pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
type SendXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||||
@@ -436,21 +436,21 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = frame_support::traits::Nothing;
|
type XcmReserveTransferFilter = frame_support::traits::Nothing;
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
||||||
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_xcm::Config for Runtime {
|
impl cumulus_pallet_xcm::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ChannelInfo = ParachainSystem;
|
type ChannelInfo = ParachainSystem;
|
||||||
type VersionWrapper = ();
|
type VersionWrapper = ();
|
||||||
@@ -461,15 +461,15 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
|
type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_ping::Config for Runtime {
|
impl cumulus_ping::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -489,7 +489,7 @@ pub type AdminOrigin =
|
|||||||
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<RocLocation, UnitBody>>>;
|
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<RocLocation, UnitBody>>>;
|
||||||
|
|
||||||
impl pallet_assets::Config for Runtime {
|
impl pallet_assets::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Balance = u64;
|
type Balance = u64;
|
||||||
type AssetId = AssetId;
|
type AssetId = AssetId;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
@@ -573,9 +573,10 @@ pub type SignedExtra = (
|
|||||||
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
|
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
|
||||||
);
|
);
|
||||||
/// Unchecked extrinsic type as expected by this runtime.
|
/// Unchecked extrinsic type as expected by this runtime.
|
||||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
pub type UncheckedExtrinsic =
|
||||||
|
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||||
/// Extrinsic type that has already been checked.
|
/// Extrinsic type that has already been checked.
|
||||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
|
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
|
||||||
/// Executive: handles dispatch to the various modules.
|
/// Executive: handles dispatch to the various modules.
|
||||||
pub type Executive = frame_executive::Executive<
|
pub type Executive = frame_executive::Executive<
|
||||||
Runtime,
|
Runtime,
|
||||||
@@ -697,17 +698,17 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
|
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||||
for Runtime
|
for Runtime
|
||||||
{
|
{
|
||||||
fn query_call_info(
|
fn query_call_info(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||||
TransactionPayment::query_call_info(call, len)
|
TransactionPayment::query_call_info(call, len)
|
||||||
}
|
}
|
||||||
fn query_call_fee_details(
|
fn query_call_fee_details(
|
||||||
call: Call,
|
call: RuntimeCall,
|
||||||
len: u32,
|
len: u32,
|
||||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||||
TransactionPayment::query_call_fee_details(call, len)
|
TransactionPayment::query_call_fee_details(call, len)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
mod block_builder;
|
mod block_builder;
|
||||||
use codec::{Decode, Encode};
|
use codec::{Decode, Encode};
|
||||||
use runtime::{
|
use runtime::{
|
||||||
Balance, Block, BlockHashCount, Call, GenesisConfig, Runtime, Signature, SignedExtra,
|
Balance, Block, BlockHashCount, GenesisConfig, Runtime, RuntimeCall, Signature, SignedExtra,
|
||||||
SignedPayload, UncheckedExtrinsic, VERSION,
|
SignedPayload, UncheckedExtrinsic, VERSION,
|
||||||
};
|
};
|
||||||
use sc_executor::{WasmExecutionMethod, WasmExecutor};
|
use sc_executor::{WasmExecutionMethod, WasmExecutor};
|
||||||
@@ -122,7 +122,7 @@ fn genesis_config() -> GenesisConfig {
|
|||||||
pub fn generate_extrinsic(
|
pub fn generate_extrinsic(
|
||||||
client: &Client,
|
client: &Client,
|
||||||
origin: sp_keyring::AccountKeyring,
|
origin: sp_keyring::AccountKeyring,
|
||||||
function: impl Into<Call>,
|
function: impl Into<RuntimeCall>,
|
||||||
) -> UncheckedExtrinsic {
|
) -> UncheckedExtrinsic {
|
||||||
let current_block_hash = client.info().best_hash;
|
let current_block_hash = client.info().best_hash;
|
||||||
let current_block = client.info().best_number.saturated_into();
|
let current_block = client.info().best_number.saturated_into();
|
||||||
@@ -165,8 +165,10 @@ pub fn transfer(
|
|||||||
dest: sp_keyring::AccountKeyring,
|
dest: sp_keyring::AccountKeyring,
|
||||||
value: Balance,
|
value: Balance,
|
||||||
) -> UncheckedExtrinsic {
|
) -> UncheckedExtrinsic {
|
||||||
let function =
|
let function = RuntimeCall::Balances(pallet_balances::Call::transfer {
|
||||||
Call::Balances(pallet_balances::Call::transfer { dest: dest.public().into(), value });
|
dest: dest.public().into(),
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
|
||||||
generate_extrinsic(client, origin, function)
|
generate_extrinsic(client, origin, function)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ impl frame_system::Config for Runtime {
|
|||||||
/// The identifier used to distinguish between accounts.
|
/// The identifier used to distinguish between accounts.
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
/// The aggregated dispatch type that is available for extrinsics.
|
/// The aggregated dispatch type that is available for extrinsics.
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||||
type Lookup = IdentityLookup<AccountId>;
|
type Lookup = IdentityLookup<AccountId>;
|
||||||
/// The index type for storing how many extrinsics an account has signed.
|
/// The index type for storing how many extrinsics an account has signed.
|
||||||
@@ -184,7 +184,7 @@ impl frame_system::Config for Runtime {
|
|||||||
/// The header type.
|
/// The header type.
|
||||||
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
/// The ubiquitous origin type.
|
/// The ubiquitous origin type.
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
||||||
@@ -229,7 +229,7 @@ impl pallet_balances::Config for Runtime {
|
|||||||
/// The type for recording an account's balance.
|
/// The type for recording an account's balance.
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
/// The ubiquitous event type.
|
/// The ubiquitous event type.
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ExistentialDeposit;
|
type ExistentialDeposit = ExistentialDeposit;
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
@@ -244,7 +244,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
|
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
|
||||||
type WeightToFee = IdentityFee<Balance>;
|
type WeightToFee = IdentityFee<Balance>;
|
||||||
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
|
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
|
||||||
@@ -253,13 +253,13 @@ impl pallet_transaction_payment::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_sudo::Config for Runtime {
|
impl pallet_sudo::Config for Runtime {
|
||||||
type Call = Call;
|
type RuntimeCall = RuntimeCall;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Runtime {
|
impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||||
type SelfParaId = ParachainId;
|
type SelfParaId = ParachainId;
|
||||||
type Event = Event;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnSystemEvent = ();
|
type OnSystemEvent = ();
|
||||||
type OutboundXcmpMessageSource = ();
|
type OutboundXcmpMessageSource = ();
|
||||||
type DmpMessageHandler = ();
|
type DmpMessageHandler = ();
|
||||||
@@ -328,9 +328,10 @@ pub type SignedExtra = (
|
|||||||
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
|
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
|
||||||
);
|
);
|
||||||
/// Unchecked extrinsic type as expected by this runtime.
|
/// Unchecked extrinsic type as expected by this runtime.
|
||||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
pub type UncheckedExtrinsic =
|
||||||
|
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||||
/// Extrinsic type that has already been checked.
|
/// Extrinsic type that has already been checked.
|
||||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
|
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
|
||||||
/// Executive: handles dispatch to the various modules.
|
/// Executive: handles dispatch to the various modules.
|
||||||
pub type Executive = frame_executive::Executive<
|
pub type Executive = frame_executive::Executive<
|
||||||
Runtime,
|
Runtime,
|
||||||
@@ -341,7 +342,7 @@ pub type Executive = frame_executive::Executive<
|
|||||||
TestOnRuntimeUpgrade,
|
TestOnRuntimeUpgrade,
|
||||||
>;
|
>;
|
||||||
/// The payload being signed in transactions.
|
/// The payload being signed in transactions.
|
||||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;
|
||||||
|
|
||||||
pub struct TestOnRuntimeUpgrade;
|
pub struct TestOnRuntimeUpgrade;
|
||||||
|
|
||||||
|
|||||||
@@ -705,7 +705,7 @@ impl TestNode {
|
|||||||
/// Send an extrinsic to this node.
|
/// Send an extrinsic to this node.
|
||||||
pub async fn send_extrinsic(
|
pub async fn send_extrinsic(
|
||||||
&self,
|
&self,
|
||||||
function: impl Into<runtime::Call>,
|
function: impl Into<runtime::RuntimeCall>,
|
||||||
caller: Sr25519Keyring,
|
caller: Sr25519Keyring,
|
||||||
) -> Result<RpcTransactionOutput, RpcTransactionError> {
|
) -> Result<RpcTransactionOutput, RpcTransactionError> {
|
||||||
let extrinsic = construct_extrinsic(&*self.client, function, caller.pair(), Some(0));
|
let extrinsic = construct_extrinsic(&*self.client, function, caller.pair(), Some(0));
|
||||||
@@ -741,7 +741,7 @@ pub fn fetch_nonce(client: &Client, account: sp_core::sr25519::Public) -> u32 {
|
|||||||
/// Construct an extrinsic that can be applied to the test runtime.
|
/// Construct an extrinsic that can be applied to the test runtime.
|
||||||
pub fn construct_extrinsic(
|
pub fn construct_extrinsic(
|
||||||
client: &Client,
|
client: &Client,
|
||||||
function: impl Into<runtime::Call>,
|
function: impl Into<runtime::RuntimeCall>,
|
||||||
caller: sp_core::sr25519::Pair,
|
caller: sp_core::sr25519::Pair,
|
||||||
nonce: Option<u32>,
|
nonce: Option<u32>,
|
||||||
) -> runtime::UncheckedExtrinsic {
|
) -> runtime::UncheckedExtrinsic {
|
||||||
|
|||||||
Reference in New Issue
Block a user