fix: Complete snowbridge pezpallet rebrand and critical bug fixes

- snowbridge-pezpallet-* → pezsnowbridge-pezpallet-* (201 refs)
- pallet/ directories → pezpallet/ (4 locations)
- Fixed pezpallet.rs self-include recursion bug
- Fixed sc-chain-spec hardcoded crate name in derive macro
- Reverted .pezpallet_by_name() to .pallet_by_name() (subxt API)
- Added BizinikiwiConfig type alias for zombienet tests
- Deleted obsolete session state files

Verified: pezsnowbridge-pezpallet-*, pezpallet-staking,
pezpallet-staking-async, pezframe-benchmarking-cli all pass cargo check
This commit is contained in:
2025-12-16 09:57:23 +03:00
parent eea003e14d
commit 3139ffa25e
3022 changed files with 42157 additions and 23579 deletions
@@ -26,7 +26,7 @@
//! The second step is to configure `IsReserve` to recognize the relay chain as a reserve for its
//! own asset.
//! With this, you'll be able to easily mint a derivative asset, backed one-to-one from the Relay
//! Chain, by using the xcm pallet's `transfer_assets` extrinsic.
//! Chain, by using the xcm pezpallet's `transfer_assets` extrinsic.
//!
//! The `IsReserve` type takes a type that implements `ContainsPair<MultiAsset, MultiLocation>`.
//! In this case, we want a type that contains the pair `(relay_chain_native_token, relay_chain)`.
@@ -59,7 +59,7 @@ parameter_types! {
pub const MessageQueueMaxStale: u32 = 16;
}
/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet.
/// Message processor to handle any messages that were enqueued into the `MessageQueue` pezpallet.
pub struct MessageProcessor;
impl ProcessMessage for MessageProcessor {
type Origin = AggregateMessageOrigin;
@@ -158,7 +158,7 @@ impl pezpallet_xcm::Config for Runtime {
// A currency to pay for things and its matcher, we are using the relay token
type Currency = Balances;
type CurrencyMatcher = IsConcrete<HereLocation>;
// Pallet benchmarks, no need for this example
// Pezpallet benchmarks, no need for this example
type WeightInfo = pezpallet_xcm::TestWeightInfo;
// Runtime types
type RuntimeOrigin = RuntimeOrigin;
@@ -52,7 +52,7 @@ fn reserve_asset_transfers_work() {
});
// ALICE on the Relay Chain sends some Relay Chain native tokens to BOB on the teyrchain.
// The transfer is done with the `transfer_assets` extrinsic in the XCM pallet.
// The transfer is done with the `transfer_assets` extrinsic in the XCM pezpallet.
// The extrinsic figures out it should do a reserve asset transfer
// with the local chain as reserve.
Relay::execute_with(|| {
@@ -54,7 +54,7 @@ mod asset_transactor {
/// AssetTransactor for handling the relay chain token
pub type FungibleTransactor = FungibleAdapter<
// Use this implementation of the `fungible::*` traits.
// `Balances` is the name given to the balances pallet in this particular recipe.
// `Balances` is the name given to the balances pezpallet in this particular recipe.
// Any implementation of the traits would suffice.
Balances,
// This transactor deals with the native token of the Relay Chain.
@@ -184,7 +184,7 @@ impl pezpallet_xcm::Config for Runtime {
// A currency to pay for things and its matcher, we are using the relay token
type Currency = Balances;
type CurrencyMatcher = IsConcrete<RelayLocation>;
// Pallet benchmarks, no need for this recipe
// Pezpallet benchmarks, no need for this recipe
type WeightInfo = pezpallet_xcm::TestWeightInfo;
// Runtime types
type RuntimeOrigin = RuntimeOrigin;
+2 -2
View File
@@ -46,7 +46,7 @@
//! - [`Executor`](xcm_executor): Implements the XCVM, capable of executing XCMs. Highly
//! configurable.
//! - [`Builder`](xcm_builder): A collection of types used to configure the executor.
//! - [`XCM Pallet`](pezpallet_xcm): A FRAME pallet for interacting with the executor.
//! - [`XCM Pezpallet`](pezpallet_xcm): A FRAME pezpallet for interacting with the executor.
//! - [`Simulator`](xcm_pez_simulator): A playground to tinker with different XCM programs and executor
//! configurations.
//!
@@ -117,7 +117,7 @@
//! How do we represent other assets?
//! The asset hub system teyrchain in Pezkuwi, for example, holds a lot of assets.
//! To represent each of them, it uses the indices we mentioned, and it makes them interior to the
//! assets pallet instance it uses.
//! assets pezpallet instance it uses.
//! USDT, an example asset that lives on asset hub, is identified by the location
//! `Teyrchain(1000)/PalletInstance(53)/GeneralIndex(1984)`, when seen from the Pezkuwi relaychain.
#![doc = simple_mermaid::mermaid!("../mermaid/usdt_location.mmd")]
@@ -4,7 +4,7 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
version = "7.0.0"
description = "Benchmarks for the XCM pallet"
description = "Benchmarks for the XCM pezpallet"
homepage.workspace = true
repository.workspace = true
documentation = "https://docs.rs/pezpallet-xcm-benchmarks"
@@ -332,7 +332,7 @@ benchmarks_instance_pallet! {
}
impl_benchmark_test_suite!(
Pallet,
Pezpallet,
crate::fungible::mock::new_test_ext(),
crate::fungible::mock::Test
);
@@ -29,7 +29,7 @@ use xcm_builder::{
type Block = pezframe_system::mocking::MockBlock<Test>;
// For testing the pallet, we construct a mock runtime.
// For testing the pezpallet, we construct a mock runtime.
pezframe_support::construct_runtime!(
pub enum Test
{
@@ -16,17 +16,17 @@
// Benchmarking for the `AssetTransactor` trait via `Fungible`.
pub use pallet::*;
pub use pezpallet::*;
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmarking;
#[cfg(test)]
mod mock;
#[pezframe_support::pallet]
pub mod pallet {
#[pezframe_support::pezpallet]
pub mod pezpallet {
use pezframe_support::pezpallet_prelude::Get;
#[pallet::config]
#[pezpallet::config]
pub trait Config<I: 'static = ()>: pezframe_system::Config + crate::Config {
/// The type of `fungible` that is being used under the hood.
///
@@ -47,6 +47,6 @@ pub mod pallet {
fn get_asset() -> xcm::latest::Asset;
}
#[pallet::pallet]
pub struct Pallet<T, I = ()>(_);
#[pezpallet::pezpallet]
pub struct Pezpallet<T, I = ()>(_);
}
@@ -962,7 +962,7 @@ mod benchmarks {
}
impl_benchmark_test_suite!(
Pallet,
Pezpallet,
crate::generic::mock::new_test_ext(),
crate::generic::mock::Test
);
@@ -50,7 +50,7 @@ impl pezframe_system::Config for Test {
type AccountData = pezpallet_balances::AccountData<u64>;
}
/// The benchmarks in this pallet should never need an asset transactor to begin with.
/// The benchmarks in this pezpallet should never need an asset transactor to begin with.
pub struct NoAssetTransactor;
impl xcm_executor::traits::TransactAsset for NoAssetTransactor {
fn deposit_asset(_: &Asset, _: &Location, _: Option<&XcmContext>) -> Result<(), XcmError> {
@@ -14,15 +14,15 @@
// You should have received a copy of the GNU General Public License
// along with Pezkuwi. If not, see <http://www.gnu.org/licenses/>.
pub use pallet::*;
pub use pezpallet::*;
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmarking;
#[cfg(test)]
mod mock;
#[pezframe_support::pallet]
pub mod pallet {
#[pezframe_support::pezpallet]
pub mod pezpallet {
use pezframe_benchmarking::BenchmarkError;
use pezframe_support::{dispatch::GetDispatchInfo, pezpallet_prelude::Encode};
use pezsp_runtime::traits::Dispatchable;
@@ -30,7 +30,7 @@ pub mod pallet {
Asset, Assets, InteriorLocation, Junction, Location, NetworkId, Response, WeightLimit,
};
#[pallet::config]
#[pezpallet::config]
pub trait Config<I: 'static = ()>: pezframe_system::Config + crate::Config {
type RuntimeCall: Dispatchable<RuntimeOrigin = Self::RuntimeOrigin>
+ GetDispatchInfo
@@ -97,19 +97,19 @@ pub mod pallet {
/// If set to `Err`, benchmarks which rely on a universal alias will be skipped.
fn alias_origin() -> Result<(Location, Location), BenchmarkError>;
/// Returns a valid pallet info for `ExpectPallet` or `QueryPallet` benchmark.
/// Returns a valid pezpallet info for `ExpectPallet` or `QueryPallet` benchmark.
///
/// By default returns `pezframe_system::Pallet` info with expected pallet index `0`.
/// By default returns `pezframe_system::Pezpallet` info with expected pezpallet index `0`.
fn valid_pallet() -> pezframe_support::traits::PalletInfoData {
pezframe_support::traits::PalletInfoData {
index: <pezframe_system::Pallet<Self> as pezframe_support::traits::PalletInfoAccess>::index(),
name: <pezframe_system::Pallet<Self> as pezframe_support::traits::PalletInfoAccess>::name(),
module_name: <pezframe_system::Pallet<Self> as pezframe_support::traits::PalletInfoAccess>::module_name(),
crate_version: <pezframe_system::Pallet<Self> as pezframe_support::traits::PalletInfoAccess>::crate_version(),
index: <pezframe_system::Pezpallet<Self> as pezframe_support::traits::PalletInfoAccess>::index(),
name: <pezframe_system::Pezpallet<Self> as pezframe_support::traits::PalletInfoAccess>::name(),
module_name: <pezframe_system::Pezpallet<Self> as pezframe_support::traits::PalletInfoAccess>::module_name(),
crate_version: <pezframe_system::Pezpallet<Self> as pezframe_support::traits::PalletInfoAccess>::crate_version(),
}
}
}
#[pallet::pallet]
pub struct Pallet<T, I = ()>(_);
#[pezpallet::pezpallet]
pub struct Pezpallet<T, I = ()>(_);
}
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Pezkuwi. If not, see <http://www.gnu.org/licenses/>.
//! Pallet that serves no other purpose than benchmarking raw messages [`Xcm`].
//! Pezpallet that serves no other purpose than benchmarking raw messages [`Xcm`].
#![cfg_attr(not(feature = "std"), no_std)]
+1 -1
View File
@@ -1,7 +1,7 @@
[package]
name = "pezpallet-xcm"
version = "7.0.0"
description = "A pallet for handling XCM programs."
description = "A pezpallet for handling XCM programs."
authors.workspace = true
edition.workspace = true
license.workspace = true
@@ -102,7 +102,7 @@ where
ensure_xcm_version(&final_message)?;
pezpallet_xcm::Pallet::<Runtime>::send(
pezpallet_xcm::Pezpallet::<Runtime>::send(
frame_origin,
final_destination.into(),
final_message.into(),
@@ -129,7 +129,7 @@ where
ensure_xcm_version(&final_message)?;
let result = pezpallet_xcm::Pallet::<Runtime>::execute(
let result = pezpallet_xcm::Pezpallet::<Runtime>::execute(
frame_origin,
final_message.into(),
max_weight,
@@ -71,7 +71,7 @@ fn test_xcm_send_precompile_works() {
let call = IXcm::IXcmCalls::send(xcm_send_params);
let encoded_call = call.abi_encode();
let result = pezpallet_revive::Pallet::<Test>::bare_call(
let result = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -120,7 +120,7 @@ fn test_xcm_send_precompile_to_teyrchain() {
let call = IXcm::IXcmCalls::send(xcm_send_params);
let encoded_call = call.abi_encode();
let result = pezpallet_revive::Pallet::<Test>::bare_call(
let result = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -169,7 +169,7 @@ fn test_xcm_send_precompile_fails() {
let call = IXcm::IXcmCalls::send(xcm_send_params);
let encoded_call = call.abi_encode();
let result = pezpallet_revive::Pallet::<Test>::bare_call(
let result = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -219,7 +219,7 @@ fn send_fails_on_old_location_version() {
let call = IXcm::IXcmCalls::send(xcm_send_params);
let encoded_call = call.abi_encode();
let result = pezpallet_revive::Pallet::<Test>::bare_call(
let result = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -246,7 +246,7 @@ fn send_fails_on_old_location_version() {
let call = IXcm::IXcmCalls::send(xcm_send_params);
let encoded_call = call.abi_encode();
let result = pezpallet_revive::Pallet::<Test>::bare_call(
let result = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -296,7 +296,7 @@ fn send_fails_on_old_xcm_version() {
let call = IXcm::IXcmCalls::send(xcm_send_params);
let encoded_call = call.abi_encode();
let result = pezpallet_revive::Pallet::<Test>::bare_call(
let result = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -324,7 +324,7 @@ fn send_fails_on_old_xcm_version() {
let call = IXcm::IXcmCalls::send(xcm_send_params);
let encoded_call = call.abi_encode();
let result = pezpallet_revive::Pallet::<Test>::bare_call(
let result = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -367,7 +367,7 @@ fn test_xcm_execute_precompile_works() {
let weight_call = IXcm::IXcmCalls::weighMessage(weight_params);
let encoded_weight_call = weight_call.abi_encode();
let xcm_weight_results = pezpallet_revive::Pallet::<Test>::bare_call(
let xcm_weight_results = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -389,7 +389,7 @@ fn test_xcm_execute_precompile_works() {
let call = IXcm::IXcmCalls::execute(xcm_execute_params);
let encoded_call = call.abi_encode();
let result = pezpallet_revive::Pallet::<Test>::bare_call(
let result = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -428,7 +428,7 @@ fn test_xcm_execute_precompile_different_beneficiary() {
let weight_call = IXcm::IXcmCalls::weighMessage(weight_params);
let encoded_weight_call = weight_call.abi_encode();
let xcm_weight_results = pezpallet_revive::Pallet::<Test>::bare_call(
let xcm_weight_results = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -450,7 +450,7 @@ fn test_xcm_execute_precompile_different_beneficiary() {
let call = IXcm::IXcmCalls::execute(xcm_execute_params);
let encoded_call = call.abi_encode();
let result = pezpallet_revive::Pallet::<Test>::bare_call(
let result = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -497,7 +497,7 @@ fn test_xcm_execute_precompile_fails() {
let weight_call = IXcm::IXcmCalls::weighMessage(weight_params);
let encoded_weight_call = weight_call.abi_encode();
let xcm_weight_results = pezpallet_revive::Pallet::<Test>::bare_call(
let xcm_weight_results = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -519,7 +519,7 @@ fn test_xcm_execute_precompile_fails() {
let call = IXcm::IXcmCalls::execute(xcm_execute_params);
let encoded_call = call.abi_encode();
let result = pezpallet_revive::Pallet::<Test>::bare_call(
let result = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -565,7 +565,7 @@ fn execute_fails_on_old_version() {
let weight_call = IXcm::IXcmCalls::weighMessage(weight_params);
let encoded_weight_call = weight_call.abi_encode();
let xcm_weight_results = pezpallet_revive::Pallet::<Test>::bare_call(
let xcm_weight_results = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -594,7 +594,7 @@ fn execute_fails_on_old_version() {
let call = IXcm::IXcmCalls::execute(xcm_execute_params);
let encoded_call = call.abi_encode();
let result = pezpallet_revive::Pallet::<Test>::bare_call(
let result = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -621,7 +621,7 @@ fn execute_fails_on_old_version() {
let call = IXcm::IXcmCalls::execute(xcm_execute_params);
let encoded_call = call.abi_encode();
let result = pezpallet_revive::Pallet::<Test>::bare_call(
let result = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -670,7 +670,7 @@ fn weight_fails_on_old_version() {
let weight_call = IXcm::IXcmCalls::weighMessage(weight_params);
let encoded_weight_call = weight_call.abi_encode();
let xcm_weight_results = pezpallet_revive::Pallet::<Test>::bare_call(
let xcm_weight_results = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
@@ -694,7 +694,7 @@ fn weight_fails_on_old_version() {
let weight_call = IXcm::IXcmCalls::weighMessage(weight_params);
let encoded_weight_call = weight_call.abi_encode();
let xcm_weight_results = pezpallet_revive::Pallet::<Test>::bare_call(
let xcm_weight_results = pezpallet_revive::Pezpallet::<Test>::bare_call(
RuntimeOrigin::signed(ALICE),
xcm_precompile_addr,
U256::zero(),
+23 -23
View File
@@ -24,10 +24,10 @@ use xcm_executor::traits::FeeReason;
type RuntimeOrigin<T> = <T as pezframe_system::Config>::RuntimeOrigin;
/// Pallet we're benchmarking here.
pub struct Pallet<T: Config>(crate::Pallet<T>);
/// Pezpallet we're benchmarking here.
pub struct Pezpallet<T: Config>(crate::Pezpallet<T>);
/// Trait that must be implemented by runtime to be able to benchmark pallet properly.
/// Trait that must be implemented by runtime to be able to benchmark pezpallet properly.
pub trait Config: crate::Config + pezpallet_balances::Config {
/// Helper that ensures successful delivery for extrinsics/benchmarks which need `SendXcm`.
type DeliveryHelper: EnsureDelivery;
@@ -376,7 +376,7 @@ mod benchmarks {
FeeReason::ChargeFees,
);
let _ = crate::Pallet::<T>::request_version_notify(loc);
let _ = crate::Pezpallet::<T>::request_version_notify(loc);
#[extrinsic_call]
_(RawOrigin::Root, Box::new(versioned_loc));
@@ -398,7 +398,7 @@ mod benchmarks {
#[block]
{
crate::Pallet::<T>::lazy_migration(
crate::Pezpallet::<T>::lazy_migration(
VersionMigrationStage::MigrateSupportedVersion,
Weight::zero(),
);
@@ -413,7 +413,7 @@ mod benchmarks {
#[block]
{
crate::Pallet::<T>::lazy_migration(
crate::Pezpallet::<T>::lazy_migration(
VersionMigrationStage::MigrateVersionNotifiers,
Weight::zero(),
);
@@ -435,7 +435,7 @@ mod benchmarks {
#[block]
{
crate::Pallet::<T>::lazy_migration(
crate::Pezpallet::<T>::lazy_migration(
VersionMigrationStage::NotifyCurrentTargets(None),
Weight::zero(),
);
@@ -456,7 +456,7 @@ mod benchmarks {
#[block]
{
crate::Pallet::<T>::lazy_migration(
crate::Pezpallet::<T>::lazy_migration(
VersionMigrationStage::NotifyCurrentTargets(None),
Weight::zero(),
);
@@ -482,7 +482,7 @@ mod benchmarks {
#[block]
{
crate::Pallet::<T>::lazy_migration(
crate::Pezpallet::<T>::lazy_migration(
VersionMigrationStage::MigrateAndNotifyOldTargets,
Weight::zero(),
);
@@ -498,7 +498,7 @@ mod benchmarks {
#[block]
{
crate::Pallet::<T>::lazy_migration(
crate::Pezpallet::<T>::lazy_migration(
VersionMigrationStage::MigrateAndNotifyOldTargets,
Weight::zero(),
);
@@ -516,7 +516,7 @@ mod benchmarks {
#[block]
{
crate::Pallet::<T>::lazy_migration(
crate::Pezpallet::<T>::lazy_migration(
VersionMigrationStage::MigrateAndNotifyOldTargets,
Weight::zero(),
);
@@ -533,7 +533,7 @@ mod benchmarks {
#[block]
{
crate::Pallet::<T>::new_query(responder, timeout, match_querier);
crate::Pezpallet::<T>::new_query(responder, timeout, match_querier);
}
}
@@ -542,7 +542,7 @@ mod benchmarks {
let responder = Location::from(Parent);
let timeout = 1u32.into();
let match_querier = Location::from(Here);
let query_id = crate::Pallet::<T>::new_query(responder, timeout, match_querier);
let query_id = crate::Pezpallet::<T>::new_query(responder, timeout, match_querier);
let infos = (0..xcm::v3::MaxPalletsInfo::get())
.map(|_| {
PalletInfo::new(
@@ -564,14 +564,14 @@ mod benchmarks {
.unwrap()
})
.collect::<Vec<_>>();
crate::Pallet::<T>::expect_response(
crate::Pezpallet::<T>::expect_response(
query_id,
Response::PalletsInfo(infos.try_into().unwrap()),
);
#[block]
{
<crate::Pallet<T> as QueryHandler>::take_response(query_id);
<crate::Pezpallet<T> as QueryHandler>::take_response(query_id);
}
}
@@ -582,7 +582,7 @@ mod benchmarks {
.map_err(|_| BenchmarkError::Override(BenchmarkResult::from_weight(Weight::MAX)))?;
let asset: Asset = T::get_asset();
// Trap assets for claiming later
crate::Pallet::<T>::drop_assets(
crate::Pezpallet::<T>::drop_assets(
&claim_location,
asset.clone().into(),
&XcmContext { origin: None, message_id: [0u8; 32], topic: None },
@@ -618,7 +618,7 @@ mod benchmarks {
// Give some multiple of ED
let balance = T::ExistentialDeposit::get() * 1000000u32.into();
let _ =
<pezpallet_balances::Pallet::<T> as pezframe_support::traits::Currency<_>>::make_free_balance_be(&who, balance);
<pezpallet_balances::Pezpallet::<T> as pezframe_support::traits::Currency<_>>::make_free_balance_be(&who, balance);
let mut existing_aliases = BoundedVec::<OriginAliaser, MaxAuthorizedAliases>::new();
// prepopulate list with `max-1` aliases to benchmark worst case
@@ -686,7 +686,7 @@ mod benchmarks {
// Give some multiple of ED
let balance = T::ExistentialDeposit::get() * 1000000u32.into();
let _ =
<pezpallet_balances::Pallet::<T> as pezframe_support::traits::Currency<_>>::make_free_balance_be(&who, balance);
<pezpallet_balances::Pezpallet::<T> as pezframe_support::traits::Currency<_>>::make_free_balance_be(&who, balance);
let mut existing_aliases = BoundedVec::<OriginAliaser, MaxAuthorizedAliases>::new();
// prepopulate list with `max` aliases to benchmark worst case
@@ -728,7 +728,7 @@ mod benchmarks {
#[block]
{
crate::Pallet::<T>::query_xcm_weight(versioned_msg)
crate::Pezpallet::<T>::query_xcm_weight(versioned_msg)
.map_err(|_| BenchmarkError::Override(BenchmarkResult::from_weight(Weight::MAX)))?;
}
@@ -736,7 +736,7 @@ mod benchmarks {
}
impl_benchmark_test_suite!(
Pallet,
Pezpallet,
crate::mock::new_test_ext_with_balances(Vec::new()),
crate::mock::Test
);
@@ -763,14 +763,14 @@ pub mod helpers {
let balance = amount * 10u32.into();
let who = whitelisted_caller();
let _ =
<pezpallet_balances::Pallet::<T> as pezframe_support::traits::Currency<_>>::make_free_balance_be(&who, balance);
<pezpallet_balances::Pezpallet::<T> as pezframe_support::traits::Currency<_>>::make_free_balance_be(&who, balance);
// verify initial balance
assert_eq!(pezpallet_balances::Pallet::<T>::free_balance(&who), balance);
assert_eq!(pezpallet_balances::Pezpallet::<T>::free_balance(&who), balance);
// verify transferred successfully
let verify = Box::new(move || {
// verify balance after transfer, decreased by transferred amount (and delivery fees)
assert!(pezpallet_balances::Pallet::<T>::free_balance(&who) <= balance - amount);
assert!(pezpallet_balances::Pezpallet::<T>::free_balance(&who) <= balance - amount);
});
Some((assets, fee_asset_id, destination, verify))
}
+4 -4
View File
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Pezkuwi. If not, see <http://www.gnu.org/licenses/>.
//! Errors for the XCM pallet.
//! Errors for the XCM pezpallet.
use codec::{Decode, DecodeWithMemTracking, Encode};
use pezframe_support::PalletError;
@@ -97,13 +97,13 @@ pub enum ExecutionError {
/// Used by `ExpectAsset`, `ExpectError` and `ExpectOrigin` when the expectation was not true.
#[codec(index = 22)]
ExpectationFalse,
/// The provided pallet index was not found.
/// The provided pezpallet index was not found.
#[codec(index = 23)]
PalletNotFound,
/// The given pallet's name is different to that expected.
/// The given pezpallet's name is different to that expected.
#[codec(index = 24)]
NameMismatch,
/// The given pallet's version has an incompatible version to that expected.
/// The given pezpallet's version has an incompatible version to that expected.
#[codec(index = 25)]
VersionIncompatible,
/// The given operation would lead to an overflow of the Holding Register.
+106 -106
View File
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Pezkuwi. If not, see <http://www.gnu.org/licenses/>.
//! Pallet to handle XCM messages.
//! Pezpallet to handle XCM messages.
#![cfg_attr(not(feature = "std"), no_std)]
@@ -47,7 +47,7 @@ use pezframe_support::{
PalletId,
};
use pezframe_system::pezpallet_prelude::{BlockNumberFor, *};
pub use pallet::*;
pub use pezpallet::*;
use scale_info::TypeInfo;
use pezsp_core::H256;
use pezsp_runtime::{
@@ -218,8 +218,8 @@ pub fn aliasers_footprint(aliasers_count: usize) -> Footprint {
Footprint::from_parts(aliasers_count, OriginAliaser::max_encoded_len())
}
#[pezframe_support::pallet]
pub mod pallet {
#[pezframe_support::pezpallet]
pub mod pezpallet {
use super::*;
use pezframe_support::{
dispatch::{GetDispatchInfo, PostDispatchInfo},
@@ -241,16 +241,16 @@ pub mod pallet {
const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);
#[pallet::pallet]
#[pallet::storage_version(STORAGE_VERSION)]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);
#[pezpallet::pezpallet]
#[pezpallet::storage_version(STORAGE_VERSION)]
#[pezpallet::without_storage_info]
pub struct Pezpallet<T>(_);
pub type BalanceOf<T> =
<<T as Config>::Currency as Currency<<T as pezframe_system::Config>::AccountId>>::Balance;
pub type TicketOf<T> = <T as Config>::AuthorizedAliasConsideration;
#[pallet::config]
#[pezpallet::config]
/// The module configuration trait.
pub trait Config: pezframe_system::Config {
/// The overarching event type.
@@ -296,7 +296,7 @@ pub mod pallet {
type Weigher: WeightBounds<<Self as Config>::RuntimeCall>;
/// This chain's Universal Location.
#[pallet::constant]
#[pezpallet::constant]
type UniversalLocation: Get<InteriorLocation>;
/// The runtime `Origin` type.
@@ -314,10 +314,10 @@ pub mod pallet {
/// The latest supported version that we advertise. Generally just set it to
/// `pezpallet_xcm::CurrentXcmVersion`.
#[pallet::constant]
#[pezpallet::constant]
type AdvertisedXcmVersion: Get<XcmVersion>;
/// The origin that is allowed to call privileged operations on the XCM pallet
/// The origin that is allowed to call privileged operations on the XCM pezpallet
type AdminOrigin: EnsureOrigin<<Self as SysConfig>::RuntimeOrigin>;
/// The assets which we consider a given origin is trusted if they claim to have placed a
@@ -328,27 +328,27 @@ pub mod pallet {
type SovereignAccountOf: ConvertLocation<Self::AccountId>;
/// The maximum number of local XCM locks that a single account may have.
#[pallet::constant]
#[pezpallet::constant]
type MaxLockers: Get<u32>;
/// The maximum number of consumers a single remote lock may have.
#[pallet::constant]
#[pezpallet::constant]
type MaxRemoteLockConsumers: Get<u32>;
/// The ID type for local consumers of remote locks.
type RemoteLockConsumerIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy;
/// Weight information for extrinsics in this pallet.
/// Weight information for extrinsics in this pezpallet.
type WeightInfo: WeightInfo;
}
impl<T: Config> ExecuteControllerWeightInfo for Pallet<T> {
impl<T: Config> ExecuteControllerWeightInfo for Pezpallet<T> {
fn execute() -> Weight {
T::WeightInfo::execute()
}
}
impl<T: Config> ExecuteController<OriginFor<T>, <T as Config>::RuntimeCall> for Pallet<T> {
impl<T: Config> ExecuteController<OriginFor<T>, <T as Config>::RuntimeCall> for Pezpallet<T> {
type WeightInfo = Self;
fn execute(
origin: OriginFor<T>,
@@ -403,13 +403,13 @@ pub mod pallet {
}
}
impl<T: Config> SendControllerWeightInfo for Pallet<T> {
impl<T: Config> SendControllerWeightInfo for Pezpallet<T> {
fn send() -> Weight {
T::WeightInfo::send()
}
}
impl<T: Config> SendController<OriginFor<T>> for Pallet<T> {
impl<T: Config> SendController<OriginFor<T>> for Pezpallet<T> {
type WeightInfo = Self;
fn send(
origin: OriginFor<T>,
@@ -450,7 +450,7 @@ pub mod pallet {
}
}
impl<T: Config> QueryControllerWeightInfo for Pallet<T> {
impl<T: Config> QueryControllerWeightInfo for Pezpallet<T> {
fn query() -> Weight {
T::WeightInfo::new_query()
}
@@ -459,7 +459,7 @@ pub mod pallet {
}
}
impl<T: Config> QueryController<OriginFor<T>, BlockNumberFor<T>> for Pallet<T> {
impl<T: Config> QueryController<OriginFor<T>, BlockNumberFor<T>> for Pezpallet<T> {
type WeightInfo = Self;
fn query(
@@ -484,7 +484,7 @@ pub mod pallet {
}
}
impl<T: Config> EventEmitter for Pallet<T> {
impl<T: Config> EventEmitter for Pezpallet<T> {
fn emit_sent_event(
origin: Location,
destination: Location,
@@ -513,8 +513,8 @@ pub mod pallet {
}
}
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
#[pezpallet::event]
#[pezpallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
/// Execution of an XCM message was attempted.
Attempted { outcome: xcm::latest::Outcome },
@@ -634,7 +634,7 @@ pub mod pallet {
AliasesAuthorizationsRemoved { target: Location },
}
#[pallet::origin]
#[pezpallet::origin]
#[derive(
PartialEq,
Eq,
@@ -658,14 +658,14 @@ pub mod pallet {
}
}
/// A reason for this pallet placing a hold on funds.
#[pallet::composite_enum]
/// A reason for this pezpallet placing a hold on funds.
#[pezpallet::composite_enum]
pub enum HoldReason {
/// The funds are held as storage deposit for an authorized alias.
AuthorizeAlias,
}
#[pallet::error]
#[pezpallet::error]
pub enum Error<T> {
/// The desired destination was unreachable, generally because there is a no way of routing
/// to it.
@@ -803,11 +803,11 @@ pub mod pallet {
}
/// The latest available query index.
#[pallet::storage]
#[pezpallet::storage]
pub(super) type QueryCounter<T: Config> = StorageValue<_, QueryId, ValueQuery>;
/// The ongoing queries.
#[pallet::storage]
#[pezpallet::storage]
pub(super) type Queries<T: Config> =
StorageMap<_, Blake2_128Concat, QueryId, QueryStatus<BlockNumberFor<T>>, OptionQuery>;
@@ -815,17 +815,17 @@ pub mod pallet {
///
/// Key is the blake2 256 hash of (origin, versioned `Assets`) pair. Value is the number of
/// times this pair has been trapped (usually just 1 if it exists at all).
#[pallet::storage]
#[pezpallet::storage]
pub(super) type AssetTraps<T: Config> = StorageMap<_, Identity, H256, u32, ValueQuery>;
/// Default version to encode XCM when latest version of destination is unknown. If `None`,
/// then the destinations whose XCM version is unknown are considered unreachable.
#[pallet::storage]
#[pallet::whitelist_storage]
#[pezpallet::storage]
#[pezpallet::whitelist_storage]
pub(super) type SafeXcmVersion<T: Config> = StorageValue<_, XcmVersion, OptionQuery>;
/// The Latest versions that we know various locations support.
#[pallet::storage]
#[pezpallet::storage]
pub(super) type SupportedVersion<T: Config> = StorageDoubleMap<
_,
Twox64Concat,
@@ -837,7 +837,7 @@ pub mod pallet {
>;
/// All locations that we have requested version notifications from.
#[pallet::storage]
#[pezpallet::storage]
pub(super) type VersionNotifiers<T: Config> = StorageDoubleMap<
_,
Twox64Concat,
@@ -850,7 +850,7 @@ pub mod pallet {
/// The target locations that are subscribed to our version changes, as well as the most recent
/// of our versions we informed them of.
#[pallet::storage]
#[pezpallet::storage]
pub(super) type VersionNotifyTargets<T: Config> = StorageDoubleMap<
_,
Twox64Concat,
@@ -871,8 +871,8 @@ pub mod pallet {
/// Destinations whose latest XCM version we would like to know. Duplicates not allowed, and
/// the `u32` counter is the number of times that a send to the destination has been attempted,
/// which is used as a prioritization.
#[pallet::storage]
#[pallet::whitelist_storage]
#[pezpallet::storage]
#[pezpallet::whitelist_storage]
pub(super) type VersionDiscoveryQueue<T: Config> = StorageValue<
_,
BoundedVec<(VersionedLocation, u32), VersionDiscoveryQueueSize<T>>,
@@ -880,7 +880,7 @@ pub mod pallet {
>;
/// The current migration's stage, if any.
#[pallet::storage]
#[pezpallet::storage]
pub(super) type CurrentMigration<T: Config> =
StorageValue<_, VersionMigrationStage, OptionQuery>;
@@ -908,7 +908,7 @@ pub mod pallet {
}
/// Fungible assets which we know are locked on a remote chain.
#[pallet::storage]
#[pezpallet::storage]
pub(super) type RemoteLockedFungibles<T: Config> = StorageNMap<
_,
(
@@ -921,7 +921,7 @@ pub mod pallet {
>;
/// Fungible assets which we know are locked on this chain.
#[pallet::storage]
#[pezpallet::storage]
pub(super) type LockedFungibles<T: Config> = StorageMap<
_,
Blake2_128Concat,
@@ -931,7 +931,7 @@ pub mod pallet {
>;
/// Global suspension state of the XCM executor.
#[pallet::storage]
#[pezpallet::storage]
pub(super) type XcmExecutionSuspended<T: Config> = StorageValue<_, bool, ValueQuery>;
/// Whether or not incoming XCMs (both executed locally and received) should be recorded.
@@ -939,24 +939,24 @@ pub mod pallet {
/// This is meant to be used in runtime APIs, and it's advised it stays false
/// for all other use cases, so as to not degrade regular performance.
///
/// Only relevant if this pallet is being used as the [`xcm_executor::traits::RecordXcm`]
/// Only relevant if this pezpallet is being used as the [`xcm_executor::traits::RecordXcm`]
/// implementation in the XCM executor configuration.
#[pallet::storage]
#[pezpallet::storage]
pub(crate) type ShouldRecordXcm<T: Config> = StorageValue<_, bool, ValueQuery>;
/// If [`ShouldRecordXcm`] is set to true, then the last XCM program executed locally
/// will be stored here.
/// Runtime APIs can fetch the XCM that was executed by accessing this value.
///
/// Only relevant if this pallet is being used as the [`xcm_executor::traits::RecordXcm`]
/// Only relevant if this pezpallet is being used as the [`xcm_executor::traits::RecordXcm`]
/// implementation in the XCM executor configuration.
#[pallet::storage]
#[pezpallet::storage]
pub(crate) type RecordedXcm<T: Config> = StorageValue<_, Xcm<()>>;
/// Map of authorized aliasers of local origins. Each local location can authorize a list of
/// other locations to alias into it. Each aliaser is only valid until its inner `expiry`
/// block number.
#[pallet::storage]
#[pezpallet::storage]
pub(super) type AuthorizedAliases<T: Config> = StorageMap<
_,
Blake2_128Concat,
@@ -965,7 +965,7 @@ pub mod pallet {
OptionQuery,
>;
#[pallet::genesis_config]
#[pezpallet::genesis_config]
pub struct GenesisConfig<T: Config> {
#[serde(skip)]
pub _config: core::marker::PhantomData<T>,
@@ -985,7 +985,7 @@ pub mod pallet {
}
}
#[pallet::genesis_build]
#[pezpallet::genesis_build]
impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
fn build(&self) {
SafeXcmVersion::<T>::set(self.safe_xcm_version);
@@ -1000,8 +1000,8 @@ pub mod pallet {
}
}
#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
#[pezpallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {
fn on_initialize(_n: BlockNumberFor<T>) -> Weight {
let mut weight_used = Weight::zero();
if let Some(migration) = CurrentMigration::<T>::get() {
@@ -1115,9 +1115,9 @@ pub mod pallet {
}
}
#[pallet::call(weight(<T as Config>::WeightInfo))]
impl<T: Config> Pallet<T> {
#[pallet::call_index(0)]
#[pezpallet::call(weight(<T as Config>::WeightInfo))]
impl<T: Config> Pezpallet<T> {
#[pezpallet::call_index(0)]
pub fn send(
origin: OriginFor<T>,
dest: Box<VersionedLocation>,
@@ -1144,7 +1144,7 @@ pub mod pallet {
/// - `assets`: The assets to be withdrawn. This should include the assets used to pay the
/// fee on the `dest` chain.
/// - `fee_asset_id`: Id of the asset from `assets` which should be used to pay fees.
#[pallet::call_index(1)]
#[pezpallet::call_index(1)]
#[allow(deprecated)]
#[deprecated(
note = "This extrinsic uses `WeightLimit::Unlimited`, please migrate to `limited_teleport_assets` or `transfer_assets`"
@@ -1188,7 +1188,7 @@ pub mod pallet {
/// - `assets`: The assets to be withdrawn. This should include the assets used to pay the
/// fee on the `dest` (and possibly reserve) chains.
/// - `fee_asset_id`: Id of the asset from `assets` which should be used to pay fees.
#[pallet::call_index(2)]
#[pezpallet::call_index(2)]
#[allow(deprecated)]
#[deprecated(
note = "This extrinsic uses `WeightLimit::Unlimited`, please migrate to `limited_reserve_transfer_assets` or `transfer_assets`"
@@ -1218,8 +1218,8 @@ pub mod pallet {
/// No more than `max_weight` will be used in its attempted execution. If this is less than
/// the maximum amount of weight that the message could take to be executed, then no
/// execution attempt will be made.
#[pallet::call_index(3)]
#[pallet::weight(max_weight.saturating_add(T::WeightInfo::execute()))]
#[pezpallet::call_index(3)]
#[pezpallet::weight(max_weight.saturating_add(T::WeightInfo::execute()))]
pub fn execute(
origin: OriginFor<T>,
message: Box<VersionedXcm<<T as Config>::RuntimeCall>>,
@@ -1236,7 +1236,7 @@ pub mod pallet {
/// - `origin`: Must be an origin specified by AdminOrigin.
/// - `location`: The destination that is being described.
/// - `xcm_version`: The latest version of XCM that `location` supports.
#[pallet::call_index(4)]
#[pezpallet::call_index(4)]
pub fn force_xcm_version(
origin: OriginFor<T>,
location: Box<Location>,
@@ -1254,7 +1254,7 @@ pub mod pallet {
///
/// - `origin`: Must be an origin specified by AdminOrigin.
/// - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable.
#[pallet::call_index(5)]
#[pezpallet::call_index(5)]
pub fn force_default_xcm_version(
origin: OriginFor<T>,
maybe_xcm_version: Option<XcmVersion>,
@@ -1268,7 +1268,7 @@ pub mod pallet {
///
/// - `origin`: Must be an origin specified by AdminOrigin.
/// - `location`: The location to which we should subscribe for XCM version notifications.
#[pallet::call_index(6)]
#[pezpallet::call_index(6)]
pub fn force_subscribe_version_notify(
origin: OriginFor<T>,
location: Box<VersionedLocation>,
@@ -1300,7 +1300,7 @@ pub mod pallet {
/// - `origin`: Must be an origin specified by AdminOrigin.
/// - `location`: The location to which we are currently subscribed for XCM version
/// notifications which we no longer desire.
#[pallet::call_index(7)]
#[pezpallet::call_index(7)]
pub fn force_unsubscribe_version_notify(
origin: OriginFor<T>,
location: Box<VersionedLocation>,
@@ -1355,8 +1355,8 @@ pub mod pallet {
/// fee on the `dest` (and possibly reserve) chains.
/// - `fee_asset_id`: Id of the asset from `assets` which should be used to pay fees.
/// - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
#[pallet::call_index(8)]
#[pallet::weight(T::WeightInfo::reserve_transfer_assets())]
#[pezpallet::call_index(8)]
#[pezpallet::weight(T::WeightInfo::reserve_transfer_assets())]
pub fn limited_reserve_transfer_assets(
origin: OriginFor<T>,
dest: Box<VersionedLocation>,
@@ -1392,8 +1392,8 @@ pub mod pallet {
/// fee on the `dest` chain.
/// - `fee_asset_id`: Id of the asset from `assets` which should be used to pay fees.
/// - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
#[pallet::call_index(9)]
#[pallet::weight(T::WeightInfo::teleport_assets())]
#[pezpallet::call_index(9)]
#[pezpallet::weight(T::WeightInfo::teleport_assets())]
pub fn limited_teleport_assets(
origin: OriginFor<T>,
dest: Box<VersionedLocation>,
@@ -1409,7 +1409,7 @@ pub mod pallet {
///
/// - `origin`: Must be an origin specified by AdminOrigin.
/// - `suspended`: `true` to suspend, `false` to resume.
#[pallet::call_index(10)]
#[pezpallet::call_index(10)]
pub fn force_suspension(origin: OriginFor<T>, suspended: bool) -> DispatchResult {
T::AdminOrigin::ensure_origin(origin)?;
XcmExecutionSuspended::<T>::set(suspended);
@@ -1448,7 +1448,7 @@ pub mod pallet {
/// fee on the `dest` (and possibly reserve) chains.
/// - `fee_asset_id`: Id of the asset from `assets` which should be used to pay fees.
/// - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
#[pallet::call_index(11)]
#[pezpallet::call_index(11)]
pub fn transfer_assets(
origin: OriginFor<T>,
dest: Box<VersionedLocation>,
@@ -1519,13 +1519,13 @@ pub mod pallet {
)
}
/// Claims assets trapped on this pallet because of leftover assets during XCM execution.
/// Claims assets trapped on this pezpallet because of leftover assets during XCM execution.
///
/// - `origin`: Anyone can call this extrinsic.
/// - `assets`: The exact assets that were trapped. Use the version to specify what version
/// was the latest when they were trapped.
/// - `beneficiary`: The location/account where the claimed assets will be deposited.
#[pallet::call_index(12)]
#[pezpallet::call_index(12)]
pub fn claim_assets(
origin: OriginFor<T>,
assets: Box<VersionedAssets>,
@@ -1622,8 +1622,8 @@ pub mod pallet {
/// - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the
/// transfer, which also determines what happens to the assets on the destination chain.
/// - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
#[pallet::call_index(13)]
#[pallet::weight(T::WeightInfo::transfer_assets())]
#[pezpallet::call_index(13)]
#[pezpallet::weight(T::WeightInfo::transfer_assets())]
pub fn transfer_assets_using_type_and_then(
origin: OriginFor<T>,
dest: Box<VersionedLocation>,
@@ -1695,7 +1695,7 @@ pub mod pallet {
/// WARNING: make sure the caller `origin` (you) trusts the `aliaser` location to act in
/// their/your name. Once authorized using this call, the `aliaser` can freely impersonate
/// `origin` in XCM programs executed on the local chain.
#[pallet::call_index(14)]
#[pezpallet::call_index(14)]
pub fn add_authorized_alias(
origin: OriginFor<T>,
aliaser: Box<VersionedLocation>,
@@ -1722,7 +1722,7 @@ pub mod pallet {
if let Some(expiry) = expires {
ensure!(
expiry >
pezframe_system::Pallet::<T>::current_block_number().saturated_into::<u64>(),
pezframe_system::Pezpallet::<T>::current_block_number().saturated_into::<u64>(),
Error::<T>::ExpiresInPast
);
}
@@ -1778,7 +1778,7 @@ pub mod pallet {
/// Remove a previously authorized `aliaser` from the list of locations that can alias into
/// the local `origin` making this call.
#[pallet::call_index(15)]
#[pezpallet::call_index(15)]
pub fn remove_authorized_alias(
origin: OriginFor<T>,
aliaser: Box<VersionedLocation>,
@@ -1838,8 +1838,8 @@ pub mod pallet {
/// Remove all previously authorized `aliaser`s that can alias into the local `origin`
/// making this call.
#[pallet::call_index(16)]
#[pallet::weight(T::WeightInfo::remove_authorized_alias())]
#[pezpallet::call_index(16)]
#[pezpallet::weight(T::WeightInfo::remove_authorized_alias())]
pub fn remove_all_authorized_aliases(origin: OriginFor<T>) -> DispatchResult {
let signed_origin = ensure_signed(origin.clone())?;
let origin_location: Location = T::ExecuteXcmOrigin::ensure_origin(origin)?;
@@ -1893,7 +1893,7 @@ impl<T: Config> core::fmt::Debug for FeesHandling<T> {
}
}
impl<T: Config> QueryHandler for Pallet<T> {
impl<T: Config> QueryHandler for Pezpallet<T> {
type BlockNumber = BlockNumberFor<T>;
type Error = XcmError;
type UniversalLocation = T::UniversalLocation;
@@ -1970,12 +1970,12 @@ impl<T: Config> QueryHandler for Pallet<T> {
let response = response.into();
Queries::<T>::insert(
id,
QueryStatus::Ready { response, at: pezframe_system::Pallet::<T>::current_block_number() },
QueryStatus::Ready { response, at: pezframe_system::Pezpallet::<T>::current_block_number() },
);
}
}
impl<T: Config> Pallet<T> {
impl<T: Config> Pezpallet<T> {
/// The ongoing queries.
pub fn query(query_id: &QueryId) -> Option<QueryStatus<BlockNumberFor<T>>> {
Queries::<T>::get(query_id)
@@ -3075,14 +3075,14 @@ impl<T: Config> Pallet<T> {
RuntimeCall: Dispatchable<PostInfo = PostDispatchInfo>,
<RuntimeCall as Dispatchable>::RuntimeOrigin: From<OriginCaller>,
{
crate::Pallet::<Runtime>::set_record_xcm(true);
crate::Pezpallet::<Runtime>::set_record_xcm(true);
// Clear other messages in queues...
Router::clear_messages();
// ...and reset events to make sure we only record events from current call.
pezframe_system::Pallet::<Runtime>::reset_events();
pezframe_system::Pezpallet::<Runtime>::reset_events();
let result = call.dispatch(origin.into());
crate::Pallet::<Runtime>::set_record_xcm(false);
let local_xcm = crate::Pallet::<Runtime>::recorded_xcm()
crate::Pezpallet::<Runtime>::set_record_xcm(false);
let local_xcm = crate::Pezpallet::<Runtime>::recorded_xcm()
.map(|xcm| VersionedXcm::<()>::from(xcm).into_version(result_xcms_version))
.transpose()
.map_err(|()| {
@@ -3105,7 +3105,7 @@ impl<T: Config> Pallet<T> {
},
)?;
let events: Vec<<Runtime as pezframe_system::Config>::RuntimeEvent> =
pezframe_system::Pallet::<Runtime>::read_events_no_consensus()
pezframe_system::Pezpallet::<Runtime>::read_events_no_consensus()
.map(|record| record.event.clone())
.collect();
Ok(CallDryRunEffects {
@@ -3146,7 +3146,7 @@ impl<T: Config> Pallet<T> {
// To make sure we only record events from current call.
Router::clear_messages();
pezframe_system::Pallet::<T>::reset_events();
pezframe_system::Pezpallet::<T>::reset_events();
let result = <T as Config>::XcmExecutor::prepare_and_execute(
origin_location,
@@ -3163,7 +3163,7 @@ impl<T: Config> Pallet<T> {
);
})?;
let events: Vec<<T as pezframe_system::Config>::RuntimeEvent> =
pezframe_system::Pallet::<T>::read_events_no_consensus()
pezframe_system::Pezpallet::<T>::read_events_no_consensus()
.map(|record| record.event.clone())
.collect();
Ok(XcmDryRunEffects { forwarded_xcms, emitted_events: events, execution_result: result })
@@ -3250,7 +3250,7 @@ impl<T: Config> Pallet<T> {
) -> Result<u128, XcmPaymentApiError> {
let asset: AssetId = asset.clone().try_into()
.map_err(|e| {
tracing::debug!(target: "xcm::pallet::query_weight_to_asset_fee", ?e, ?asset, "Failed to convert versioned asset");
tracing::debug!(target: "xcm::pezpallet::query_weight_to_asset_fee", ?e, ?asset, "Failed to convert versioned asset");
XcmPaymentApiError::VersionedConversionFailed
})?;
@@ -3264,7 +3264,7 @@ impl<T: Config> Pallet<T> {
let mut trader = Trader::new();
let result = trader.buy_weight(weight, max_payment.into(), &context)
.map_err(|e| {
tracing::error!(target: "xcm::pallet::query_weight_to_asset_fee", ?e, ?asset, "Failed to buy weight");
tracing::error!(target: "xcm::pezpallet::query_weight_to_asset_fee", ?e, ?asset, "Failed to buy weight");
// Return something convertible to `DispatchError` as required by the `with_transaction` fn.
DispatchError::Other("Failed to buy weight")
@@ -3272,12 +3272,12 @@ impl<T: Config> Pallet<T> {
TransactionOutcome::Rollback(result)
}).map_err(|error| {
tracing::debug!(target: "xcm::pallet::query_weight_to_asset_fee", ?error, "Failed to execute transaction");
tracing::debug!(target: "xcm::pezpallet::query_weight_to_asset_fee", ?error, "Failed to execute transaction");
XcmPaymentApiError::AssetNotFound
})?;
let Some(unspent) = unspent.fungible.get(&asset) else {
tracing::error!(target: "xcm::pallet::query_weight_to_asset_fee", ?asset, "The trader didn't return the needed fungible asset");
tracing::error!(target: "xcm::pezpallet::query_weight_to_asset_fee", ?asset, "The trader didn't return the needed fungible asset");
return Err(XcmPaymentApiError::AssetNotFound);
};
@@ -3456,7 +3456,7 @@ impl<T: Config> Pallet<T> {
aliaser
.expiry
.map(|expiry| {
pezframe_system::Pallet::<T>::current_block_number().saturated_into::<u64>() <
pezframe_system::Pezpallet::<T>::current_block_number().saturated_into::<u64>() <
expiry
})
.unwrap_or(true)
@@ -3492,7 +3492,7 @@ impl<T: Config> Pallet<T> {
/// - `message`: The message whose outcome should be reported.
/// - `responder`: The origin from which a response should be expected.
/// - `notify`: A dispatchable function which will be called once the outcome of `message` is
/// known. It may be a dispatchable in any pallet of the local chain, but other than the usual
/// known. It may be a dispatchable in any pezpallet of the local chain, but other than the usual
/// origin, it must accept exactly two arguments: `query_id: QueryId` and `outcome: Response`,
/// and in that order. It should expect that the origin is `Origin::Response` and will contain
/// the responder's location.
@@ -3580,9 +3580,9 @@ impl<T: Config> Pallet<T> {
Ok(())
}
/// Ensure the correctness of the state of this pallet.
/// Ensure the correctness of the state of this pezpallet.
///
/// This should be valid before and after each state transition of this pallet.
/// This should be valid before and after each state transition of this pezpallet.
///
/// ## Invariants
///
@@ -3762,7 +3762,7 @@ impl<T: Config> xcm_executor::traits::Enact for ReduceTicket<T> {
}
}
impl<T: Config> xcm_executor::traits::AssetLock for Pallet<T> {
impl<T: Config> xcm_executor::traits::AssetLock for Pezpallet<T> {
type LockTicket = LockTicket<T>;
type UnlockTicket = UnlockTicket<T>;
type ReduceTicket = ReduceTicket<T>;
@@ -3855,7 +3855,7 @@ impl<T: Config> xcm_executor::traits::AssetLock for Pallet<T> {
}
}
impl<T: Config> WrapVersion for Pallet<T> {
impl<T: Config> WrapVersion for Pezpallet<T> {
fn wrap_version<RuntimeCall: Decode + GetDispatchInfo>(
dest: &Location,
xcm: impl Into<VersionedXcm<RuntimeCall>>,
@@ -3876,13 +3876,13 @@ impl<T: Config> WrapVersion for Pallet<T> {
}
}
impl<T: Config> GetVersion for Pallet<T> {
impl<T: Config> GetVersion for Pezpallet<T> {
fn get_version_for(dest: &Location) -> Option<XcmVersion> {
SupportedVersion::<T>::get(XCM_VERSION, LatestVersionedLocation(dest))
}
}
impl<T: Config> VersionChangeNotifier for Pallet<T> {
impl<T: Config> VersionChangeNotifier for Pezpallet<T> {
/// Start notifying `location` should the XCM version of this chain change.
///
/// When it does, this type should ensure a `QueryResponse` message is sent with the given
@@ -3930,7 +3930,7 @@ impl<T: Config> VersionChangeNotifier for Pallet<T> {
}
}
impl<T: Config> DropAssets for Pallet<T> {
impl<T: Config> DropAssets for Pezpallet<T> {
fn drop_assets(origin: &Location, assets: AssetsInHolding, _context: &XcmContext) -> Weight {
if assets.is_empty() {
return Weight::zero();
@@ -3948,7 +3948,7 @@ impl<T: Config> DropAssets for Pallet<T> {
}
}
impl<T: Config> ClaimAssets for Pallet<T> {
impl<T: Config> ClaimAssets for Pezpallet<T> {
fn claim_assets(
origin: &Location,
ticket: &Location,
@@ -3980,7 +3980,7 @@ impl<T: Config> ClaimAssets for Pallet<T> {
}
}
impl<T: Config> OnResponse for Pallet<T> {
impl<T: Config> OnResponse for Pezpallet<T> {
fn expecting_response(
origin: &Location,
query_id: QueryId,
@@ -4147,7 +4147,7 @@ impl<T: Config> OnResponse for Pallet<T> {
None => {
let e = Event::ResponseReady { query_id, response: response.clone() };
Self::deposit_event(e);
let at = pezframe_system::Pallet::<T>::current_block_number();
let at = pezframe_system::Pezpallet::<T>::current_block_number();
let response = response.into();
Queries::<T>::insert(query_id, QueryStatus::Ready { response, at });
Weight::zero()
@@ -4163,7 +4163,7 @@ impl<T: Config> OnResponse for Pallet<T> {
}
}
impl<T: Config> CheckSuspension for Pallet<T> {
impl<T: Config> CheckSuspension for Pezpallet<T> {
fn is_suspended<Call>(
_origin: &Location,
_instructions: &mut [Instruction<Call>],
@@ -4174,7 +4174,7 @@ impl<T: Config> CheckSuspension for Pallet<T> {
}
}
impl<T: Config> RecordXcm for Pallet<T> {
impl<T: Config> RecordXcm for Pezpallet<T> {
fn should_record() -> bool {
ShouldRecordXcm::<T>::get()
}
@@ -4231,7 +4231,7 @@ impl<L: Into<VersionedLocation> + Clone, T: Config> ContainsPair<L, L> for Autho
tracing::trace!(target: "xcm::pezpallet_xcm::AuthorizedAliasers::contains", ?origin, ?target);
// return true if the `origin` has been explicitly authorized by `target` as aliaser, and
// the authorization has not expired
Pallet::<T>::is_authorized_alias(origin, target).unwrap_or(false)
Pezpallet::<T>::is_authorized_alias(origin, target).unwrap_or(false)
}
}
+6 -6
View File
@@ -15,7 +15,7 @@
// along with Pezkuwi. If not, see <http://www.gnu.org/licenses/>.
use crate::{
pallet::CurrentMigration, Config, CurrentXcmVersion, Pallet, VersionMigrationStage,
pezpallet::CurrentMigration, Config, CurrentXcmVersion, Pezpallet, VersionMigrationStage,
VersionNotifyTargets,
};
use pezframe_support::{
@@ -215,7 +215,7 @@ pub mod data {
}
}
impl<T: Config> Pallet<T> {
impl<T: Config> Pezpallet<T> {
/// Migrates relevant data to the `required_xcm_version`.
pub(crate) fn migrate_data_to_xcm_version(
weight: &mut Weight,
@@ -418,7 +418,7 @@ pub mod v1 {
fn on_runtime_upgrade() -> Weight {
let mut weight = T::DbWeight::get().reads(1);
if StorageVersion::get::<Pallet<T>>() != 0 {
if StorageVersion::get::<Pezpallet<T>>() != 0 {
tracing::warn!("skipping v1, should be removed");
return weight;
}
@@ -437,7 +437,7 @@ pub mod v1 {
tracing::info!("v1 applied successfully");
weight.saturating_accrue(T::DbWeight::get().writes(1));
StorageVersion::new(1).put::<Pallet<T>>();
StorageVersion::new(1).put::<Pezpallet<T>>();
weight
}
}
@@ -450,7 +450,7 @@ pub mod v1 {
0,
1,
VersionUncheckedMigrateToV1<T>,
crate::pallet::Pallet<T>,
crate::pezpallet::Pezpallet<T>,
<T as pezframe_system::Config>::DbWeight,
>;
}
@@ -471,7 +471,7 @@ impl<T: Config> OnRuntimeUpgrade for MigrateToLatestXcmVersion<T> {
// migrate other operational data to the latest XCM version in-place
let latest = CurrentXcmVersion::get();
Pallet::<T>::migrate_data_to_xcm_version(&mut weight, latest);
Pezpallet::<T>::migrate_data_to_xcm_version(&mut weight, latest);
weight
}
+17 -17
View File
@@ -53,7 +53,7 @@ pub type AccountId = AccountId32;
pub type Balance = u128;
type Block = pezframe_system::mocking::MockBlock<Test>;
#[pezframe_support::pallet]
#[pezframe_support::pezpallet]
pub mod pezpallet_test_notifier {
use crate::{ensure_response, QueryId};
use pezframe_support::pezpallet_prelude::*;
@@ -62,10 +62,10 @@ pub mod pezpallet_test_notifier {
use xcm::latest::prelude::*;
use xcm_executor::traits::QueryHandler;
#[pallet::pallet]
pub struct Pallet<T>(_);
#[pezpallet::pezpallet]
pub struct Pezpallet<T>(_);
#[pallet::config]
#[pezpallet::config]
pub trait Config: pezframe_system::Config + crate::Config {
#[allow(deprecated)]
type RuntimeEvent: IsType<<Self as pezframe_system::Config>::RuntimeEvent> + From<Event<Self>>;
@@ -74,30 +74,30 @@ pub mod pezpallet_test_notifier {
type RuntimeCall: IsType<<Self as crate::Config>::RuntimeCall> + From<Call<Self>>;
}
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
#[pezpallet::event]
#[pezpallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
QueryPrepared(QueryId),
NotifyQueryPrepared(QueryId),
ResponseReceived(Location, QueryId, Response),
}
#[pallet::error]
#[pezpallet::error]
pub enum Error<T> {
UnexpectedId,
BadAccountFormat,
}
#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::call_index(0)]
#[pallet::weight(Weight::from_parts(1_000_000, 1_000_000))]
#[pezpallet::call]
impl<T: Config> Pezpallet<T> {
#[pezpallet::call_index(0)]
#[pezpallet::weight(Weight::from_parts(1_000_000, 1_000_000))]
pub fn prepare_new_query(origin: OriginFor<T>, querier: Location) -> DispatchResult {
let who = ensure_signed(origin)?;
let id = who
.using_encoded(|mut d| <[u8; 32]>::decode(&mut d))
.map_err(|_| Error::<T>::BadAccountFormat)?;
let qid = <crate::Pallet<T> as QueryHandler>::new_query(
let qid = <crate::Pezpallet<T> as QueryHandler>::new_query(
Junction::AccountId32 { network: None, id },
100u32.into(),
querier,
@@ -106,8 +106,8 @@ pub mod pezpallet_test_notifier {
Ok(())
}
#[pallet::call_index(1)]
#[pallet::weight(Weight::from_parts(1_000_000, 1_000_000))]
#[pezpallet::call_index(1)]
#[pezpallet::weight(Weight::from_parts(1_000_000, 1_000_000))]
pub fn prepare_new_notify_query(origin: OriginFor<T>, querier: Location) -> DispatchResult {
let who = ensure_signed(origin)?;
let id = who
@@ -115,7 +115,7 @@ pub mod pezpallet_test_notifier {
.map_err(|_| Error::<T>::BadAccountFormat)?;
let call =
Call::<T>::notification_received { query_id: 0, response: Default::default() };
let qid = crate::Pallet::<T>::new_notify_query(
let qid = crate::Pezpallet::<T>::new_notify_query(
Junction::AccountId32 { network: None, id },
<T as Config>::RuntimeCall::from(call),
100u32.into(),
@@ -125,8 +125,8 @@ pub mod pezpallet_test_notifier {
Ok(())
}
#[pallet::call_index(2)]
#[pallet::weight(Weight::from_parts(1_000_000, 1_000_000))]
#[pezpallet::call_index(2)]
#[pezpallet::weight(Weight::from_parts(1_000_000, 1_000_000))]
pub fn notification_received(
origin: OriginFor<T>,
query_id: QueryId,
+15 -15
View File
@@ -22,10 +22,10 @@ use crate::{
aliasers_footprint,
migration::data::NeedsMigration,
mock::*,
pallet::{LockedFungibles, RemoteLockedFungibles, SupportedVersion},
pezpallet::{LockedFungibles, RemoteLockedFungibles, SupportedVersion},
xcm_helpers::find_xcm_sent_message_id,
AssetTraps, AuthorizedAliasers, Config, CurrentMigration, Error, ExecuteControllerWeightInfo,
LatestVersionedLocation, MaxAuthorizedAliases, Pallet, Queries, QueryStatus, RecordedXcm,
LatestVersionedLocation, MaxAuthorizedAliases, Pezpallet, Queries, QueryStatus, RecordedXcm,
RemoteLockedFungibleRecord, ShouldRecordXcm, VersionDiscoveryQueue, VersionMigrationStage,
VersionNotifiers, VersionNotifyTargets, WeightInfo,
};
@@ -753,7 +753,7 @@ fn incomplete_execute_reverts_side_effects() {
Err(pezsp_runtime::DispatchErrorWithPostInfo {
post_info: pezframe_support::dispatch::PostDispatchInfo {
actual_weight: Some(
<Pallet<Test> as ExecuteControllerWeightInfo>::execute() + weight
<Pezpallet<Test> as ExecuteControllerWeightInfo>::execute() + weight
),
pays_fee: pezframe_support::dispatch::Pays::Yes,
},
@@ -1417,7 +1417,7 @@ fn multistage_migration_works() {
AdvertisedXcmVersion::set(4);
// check `try-state`
assert!(Pallet::<Test>::do_try_state().is_err());
assert!(Pezpallet::<Test>::do_try_state().is_err());
// closure simulates a multistage migration process
let migrate = |expected_cycle_count| {
@@ -1476,7 +1476,7 @@ fn multistage_migration_works() {
assert_eq!(take_sent_xcm(), vec![]);
// check `try-state`
assert!(Pallet::<Test>::do_try_state().is_ok());
assert!(Pezpallet::<Test>::do_try_state().is_ok());
})
}
@@ -1484,7 +1484,7 @@ fn multistage_migration_works() {
fn migrate_data_to_xcm_version_works() {
new_test_ext_with_balances(vec![]).execute_with(|| {
// check `try-state`
assert!(Pallet::<Test>::do_try_state().is_ok());
assert!(Pezpallet::<Test>::do_try_state().is_ok());
let latest_version = XCM_VERSION;
let previous_version = XCM_VERSION - 1;
@@ -1509,16 +1509,16 @@ fn migrate_data_to_xcm_version_works() {
// store two queries: migrated and not migrated
Queries::<Test>::insert(query_id1, query_as_latest.clone());
Queries::<Test>::insert(query_id2, query_as_previous);
assert!(Pallet::<Test>::do_try_state().is_ok());
assert!(Pezpallet::<Test>::do_try_state().is_ok());
// trigger migration
Pallet::<Test>::migrate_data_to_xcm_version(&mut Weight::zero(), latest_version);
Pezpallet::<Test>::migrate_data_to_xcm_version(&mut Weight::zero(), latest_version);
// no change for query_id1
assert_eq!(Queries::<Test>::get(query_id1), Some(query_as_latest.clone()));
// change for query_id2
assert_eq!(Queries::<Test>::get(query_id2), Some(query_as_latest));
assert!(Pallet::<Test>::do_try_state().is_ok());
assert!(Pezpallet::<Test>::do_try_state().is_ok());
}
// `LockedFungibles` migration
@@ -1540,16 +1540,16 @@ fn migrate_data_to_xcm_version_works() {
// store two lockeds: migrated and not migrated
LockedFungibles::<Test>::insert(&account1, lockeds_as_latest.clone());
LockedFungibles::<Test>::insert(&account2, lockeds_as_previous);
assert!(Pallet::<Test>::do_try_state().is_ok());
assert!(Pezpallet::<Test>::do_try_state().is_ok());
// trigger migration
Pallet::<Test>::migrate_data_to_xcm_version(&mut Weight::zero(), latest_version);
Pezpallet::<Test>::migrate_data_to_xcm_version(&mut Weight::zero(), latest_version);
// no change for account1
assert_eq!(LockedFungibles::<Test>::get(&account1), Some(lockeds_as_latest.clone()));
// change for account2
assert_eq!(LockedFungibles::<Test>::get(&account2), Some(lockeds_as_latest));
assert!(Pallet::<Test>::do_try_state().is_ok());
assert!(Pezpallet::<Test>::do_try_state().is_ok());
}
// `RemoteLockedFungibles` migration
@@ -1602,10 +1602,10 @@ fn migrate_data_to_xcm_version_works() {
RemoteLockedFungibles::<Test>::insert(&key2_as_latest, data_as_previous.clone());
// neither key nor data migrated
RemoteLockedFungibles::<Test>::insert(&key3_as_previous, data_as_previous);
assert!(Pallet::<Test>::do_try_state().is_ok());
assert!(Pezpallet::<Test>::do_try_state().is_ok());
// trigger migration
Pallet::<Test>::migrate_data_to_xcm_version(&mut Weight::zero(), latest_version);
Pezpallet::<Test>::migrate_data_to_xcm_version(&mut Weight::zero(), latest_version);
let assert_locked_eq =
|left: Option<RemoteLockedFungibleRecord<_, _>>,
@@ -1638,7 +1638,7 @@ fn migrate_data_to_xcm_version_works() {
RemoteLockedFungibles::<Test>::get(&expected_key3_as_latest),
Some(data_as_latest.clone()),
);
assert!(Pallet::<Test>::do_try_state().is_ok());
assert!(Pezpallet::<Test>::do_try_state().is_ok());
}
})
}
@@ -20,7 +20,7 @@
//! reserve location will be adjusted accordingly to be Asset Hub.
//! For more information, see <https://github.com/pezkuwichain/pezkuwi-sdk/issues/158>.
use crate::{Config, Error, Pallet};
use crate::{Config, Error, Pezpallet};
use alloc::vec::Vec;
use hex_literal::hex;
use pezsp_core::Get;
@@ -31,7 +31,7 @@ use xcm_executor::traits::TransferType;
const PASEO_GENESIS_HASH: [u8; 32] =
hex!["77afd6190f1554ad45fd0d31aee62aacc33c6db0ea801129acb813f913e0764f"];
impl<T: Config> Pallet<T> {
impl<T: Config> Pezpallet<T> {
/// Check if network native asset reserve transfers should be blocked during Asset Hub
/// Migration.
///
+2 -2
View File
@@ -245,7 +245,7 @@ pub enum Junction {
/// An 8-byte index for an account of a specific network that is respected as a sovereign
/// endpoint within the context.
///
/// May be used when the context is a Frame-based chain and includes e.g. an indices pallet.
/// May be used when the context is a Frame-based chain and includes e.g. an indices pezpallet.
AccountIndex64 {
network: Option<NetworkId>,
#[codec(compact)]
@@ -256,7 +256,7 @@ pub enum Junction {
///
/// May be used when the context is an Ethereum or Bitcoin chain or smart-contract.
AccountKey20 { network: Option<NetworkId>, key: [u8; 20] },
/// An instanced, indexed pallet that forms a constituent part of the context.
/// An instanced, indexed pezpallet that forms a constituent part of the context.
///
/// Generally used when the context is a Frame-based chain.
// TODO XCMv4 inner should be `Compact<u32>`.
+9 -9
View File
@@ -308,7 +308,7 @@ pub enum Response {
ExecutionResult(Option<(u32, Error)>),
/// An XCM version.
Version(super::Version),
/// The index, instance name, pallet name and version of some pallets.
/// The index, instance name, pezpallet name and version of some pallets.
PalletsInfo(BoundedVec<PalletInfo, MaxPalletsInfo>),
/// The status of a dispatch attempt using `Transact`.
DispatchResult(MaybeErrorCode),
@@ -920,9 +920,9 @@ pub enum Instruction<Call> {
/// parameter.
ExpectTransactStatus(MaybeErrorCode),
/// Query the existence of a particular pallet type.
/// Query the existence of a particular pezpallet type.
///
/// - `module_name`: The module name of the pallet to query.
/// - `module_name`: The module name of the pezpallet to query.
/// - `response_info`: Information for making the response.
///
/// Sends a `QueryResponse` to Origin whose data field `PalletsInfo` containing the information
@@ -936,17 +936,17 @@ pub enum Instruction<Call> {
/// Errors: *Fallible*.
QueryPallet { module_name: Vec<u8>, response_info: QueryResponseInfo },
/// Ensure that a particular pallet with a particular version exists.
/// Ensure that a particular pezpallet with a particular version exists.
///
/// - `index: Compact`: The index which identifies the pallet. An error if no pallet exists at
/// - `index: Compact`: The index which identifies the pezpallet. An error if no pezpallet exists at
/// this index.
/// - `name: Vec<u8>`: Name which must be equal to the name of the pallet.
/// - `name: Vec<u8>`: Name which must be equal to the name of the pezpallet.
/// - `module_name: Vec<u8>`: Module name which must be equal to the name of the module in
/// which the pallet exists.
/// which the pezpallet exists.
/// - `crate_major: Compact`: Version number which must be equal to the major version of the
/// crate which implements the pallet.
/// crate which implements the pezpallet.
/// - `min_crate_minor: Compact`: Version number which must be at most the minor version of the
/// crate which implements the pallet.
/// crate which implements the pezpallet.
///
/// Safety: No concerns.
///
+1 -1
View File
@@ -32,7 +32,7 @@ use scale_info::TypeInfo;
/// - A (normal, layer-1) block chain, e.g. the Bitcoin mainnet or a teyrchain.
/// - A layer-0 super-chain, e.g. the Pezkuwi Relay chain.
/// - A layer-2 smart contract, e.g. an ERC-20 on Ethereum.
/// - A logical functional component of a chain, e.g. a single instance of a pallet on a Frame-based
/// - A logical functional component of a chain, e.g. a single instance of a pezpallet on a Frame-based
/// Bizinikiwi chain.
/// - An account.
///
+3 -3
View File
@@ -119,13 +119,13 @@ pub enum Error {
/// Used by `ExpectAsset`, `ExpectError` and `ExpectOrigin` when the expectation was not true.
#[codec(index = 22)]
ExpectationFalse,
/// The provided pallet index was not found.
/// The provided pezpallet index was not found.
#[codec(index = 23)]
PalletNotFound,
/// The given pallet's name is different to that expected.
/// The given pezpallet's name is different to that expected.
#[codec(index = 24)]
NameMismatch,
/// The given pallet's version has an incompatible version to that expected.
/// The given pezpallet's version has an incompatible version to that expected.
#[codec(index = 25)]
VersionIncompatible,
/// The given operation would lead to an overflow of the Holding Register.
+2 -2
View File
@@ -60,7 +60,7 @@ pub enum Junction {
/// An 8-byte index for an account of a specific network that is respected as a sovereign
/// endpoint within the context.
///
/// May be used when the context is a Frame-based chain and includes e.g. an indices pallet.
/// May be used when the context is a Frame-based chain and includes e.g. an indices pezpallet.
AccountIndex64 {
network: Option<NetworkId>,
#[codec(compact)]
@@ -71,7 +71,7 @@ pub enum Junction {
///
/// May be used when the context is an Ethereum or Bitcoin chain or smart-contract.
AccountKey20 { network: Option<NetworkId>, key: [u8; 20] },
/// An instanced, indexed pallet that forms a constituent part of the context.
/// An instanced, indexed pezpallet that forms a constituent part of the context.
///
/// Generally used when the context is a Frame-based chain.
PalletInstance(u8),
+1 -1
View File
@@ -32,7 +32,7 @@ use scale_info::TypeInfo;
/// - A (normal, layer-1) block chain, e.g. the Bitcoin mainnet or a teyrchain.
/// - A layer-0 super-chain, e.g. the Pezkuwi Relay chain.
/// - A layer-2 smart contract, e.g. an ERC-20 on Ethereum.
/// - A logical functional component of a chain, e.g. a single instance of a pallet on a Frame-based
/// - A logical functional component of a chain, e.g. a single instance of a pezpallet on a Frame-based
/// Bizinikiwi chain.
/// - An account.
///
+9 -9
View File
@@ -293,7 +293,7 @@ pub enum Response {
ExecutionResult(Option<(u32, Error)>),
/// An XCM version.
Version(super::Version),
/// The index, instance name, pallet name and version of some pallets.
/// The index, instance name, pezpallet name and version of some pallets.
PalletsInfo(BoundedVec<PalletInfo, MaxPalletsInfo>),
/// The status of a dispatch attempt using `Transact`.
DispatchResult(MaybeErrorCode),
@@ -881,9 +881,9 @@ pub enum Instruction<Call> {
/// parameter.
ExpectTransactStatus(MaybeErrorCode),
/// Query the existence of a particular pallet type.
/// Query the existence of a particular pezpallet type.
///
/// - `module_name`: The module name of the pallet to query.
/// - `module_name`: The module name of the pezpallet to query.
/// - `response_info`: Information for making the response.
///
/// Sends a `QueryResponse` to Origin whose data field `PalletsInfo` containing the information
@@ -897,17 +897,17 @@ pub enum Instruction<Call> {
/// Errors: *Fallible*.
QueryPallet { module_name: Vec<u8>, response_info: QueryResponseInfo },
/// Ensure that a particular pallet with a particular version exists.
/// Ensure that a particular pezpallet with a particular version exists.
///
/// - `index: Compact`: The index which identifies the pallet. An error if no pallet exists at
/// - `index: Compact`: The index which identifies the pezpallet. An error if no pezpallet exists at
/// this index.
/// - `name: Vec<u8>`: Name which must be equal to the name of the pallet.
/// - `name: Vec<u8>`: Name which must be equal to the name of the pezpallet.
/// - `module_name: Vec<u8>`: Module name which must be equal to the name of the module in
/// which the pallet exists.
/// which the pezpallet exists.
/// - `crate_major: Compact`: Version number which must be equal to the major version of the
/// crate which implements the pallet.
/// crate which implements the pezpallet.
/// - `min_crate_minor: Compact`: Version number which must be at most the minor version of the
/// crate which implements the pallet.
/// crate which implements the pezpallet.
///
/// Safety: No concerns.
///
+2 -2
View File
@@ -60,7 +60,7 @@ pub enum Junction {
/// An 8-byte index for an account of a specific network that is respected as a sovereign
/// endpoint within the context.
///
/// May be used when the context is a Frame-based chain and includes e.g. an indices pallet.
/// May be used when the context is a Frame-based chain and includes e.g. an indices pezpallet.
AccountIndex64 {
network: Option<NetworkId>,
#[codec(compact)]
@@ -71,7 +71,7 @@ pub enum Junction {
///
/// May be used when the context is an Ethereum or Bitcoin chain or smart-contract.
AccountKey20 { network: Option<NetworkId>, key: [u8; 20] },
/// An instanced, indexed pallet that forms a constituent part of the context.
/// An instanced, indexed pezpallet that forms a constituent part of the context.
///
/// Generally used when the context is a Frame-based chain.
PalletInstance(u8),
+1 -1
View File
@@ -32,7 +32,7 @@ use scale_info::TypeInfo;
/// - A (normal, layer-1) block chain, e.g. the Bitcoin mainnet or a teyrchain.
/// - A layer-0 super-chain, e.g. the Pezkuwi Relay chain.
/// - A layer-2 smart contract, e.g. an ERC-20 on Ethereum.
/// - A logical functional component of a chain, e.g. a single instance of a pallet on a Frame-based
/// - A logical functional component of a chain, e.g. a single instance of a pezpallet on a Frame-based
/// Bizinikiwi chain.
/// - An account.
///
+9 -9
View File
@@ -274,7 +274,7 @@ pub enum Response {
ExecutionResult(Option<(u32, Error)>),
/// An XCM version.
Version(super::Version),
/// The index, instance name, pallet name and version of some pallets.
/// The index, instance name, pezpallet name and version of some pallets.
PalletsInfo(BoundedVec<PalletInfo, MaxPalletsInfo>),
/// The status of a dispatch attempt using `Transact`.
DispatchResult(MaybeErrorCode),
@@ -839,9 +839,9 @@ pub enum Instruction<Call> {
/// parameter.
ExpectTransactStatus(MaybeErrorCode),
/// Query the existence of a particular pallet type.
/// Query the existence of a particular pezpallet type.
///
/// - `module_name`: The module name of the pallet to query.
/// - `module_name`: The module name of the pezpallet to query.
/// - `response_info`: Information for making the response.
///
/// Sends a `QueryResponse` to Origin whose data field `PalletsInfo` containing the information
@@ -855,17 +855,17 @@ pub enum Instruction<Call> {
/// Errors: *Fallible*.
QueryPallet { module_name: Vec<u8>, response_info: QueryResponseInfo },
/// Ensure that a particular pallet with a particular version exists.
/// Ensure that a particular pezpallet with a particular version exists.
///
/// - `index: Compact`: The index which identifies the pallet. An error if no pallet exists at
/// - `index: Compact`: The index which identifies the pezpallet. An error if no pezpallet exists at
/// this index.
/// - `name: Vec<u8>`: Name which must be equal to the name of the pallet.
/// - `name: Vec<u8>`: Name which must be equal to the name of the pezpallet.
/// - `module_name: Vec<u8>`: Module name which must be equal to the name of the module in
/// which the pallet exists.
/// which the pezpallet exists.
/// - `crate_major: Compact`: Version number which must be equal to the major version of the
/// crate which implements the pallet.
/// crate which implements the pezpallet.
/// - `min_crate_minor: Compact`: Version number which must be at most the minor version of the
/// crate which implements the pallet.
/// crate which implements the pezpallet.
///
/// Safety: No concerns.
///
+3 -3
View File
@@ -115,13 +115,13 @@ pub enum Error {
/// Used by `ExpectAsset`, `ExpectError` and `ExpectOrigin` when the expectation was not true.
#[codec(index = 22)]
ExpectationFalse,
/// The provided pallet index was not found.
/// The provided pezpallet index was not found.
#[codec(index = 23)]
PalletNotFound,
/// The given pallet's name is different to that expected.
/// The given pezpallet's name is different to that expected.
#[codec(index = 24)]
NameMismatch,
/// The given pallet's version has an incompatible version to that expected.
/// The given pezpallet's version has an incompatible version to that expected.
#[codec(index = 25)]
VersionIncompatible,
/// The given operation would lead to an overflow of the Holding Register.
@@ -166,7 +166,7 @@ parameter_types! {
/// Adapter for the native token.
pub type FungibleTransactor = FungibleAdapter<
// Use this implementation of the `fungible::*` traits.
// `Balances` is the name given to the balances pallet
// `Balances` is the name given to the balances pezpallet
Balances,
// This transactor deals with the native token.
IsConcrete<HereLocation>,
@@ -330,7 +330,7 @@ impl pezpallet_xcm::Config for Runtime {
// A currency to pay for things and its matcher, we are using the relay token
type Currency = Balances;
type CurrencyMatcher = crate::IsConcrete<HereLocation>;
// Pallet benchmarks, no need for this recipe
// Pezpallet benchmarks, no need for this recipe
type WeightInfo = pezpallet_xcm::TestWeightInfo;
// Runtime types
type RuntimeOrigin = RuntimeOrigin;
+1 -1
View File
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Pezkuwi. If not, see <http://www.gnu.org/licenses/>.
//! A set of traits that define how a pallet interface with XCM.
//! A set of traits that define how a pezpallet interface with XCM.
//! Controller traits defined in this module are high-level traits that will rely on other traits
//! from `xcm-executor` to perform their tasks.
@@ -58,7 +58,7 @@ pub struct DescribePalletTerminal;
impl DescribeLocation for DescribePalletTerminal {
fn describe_location(l: &Location) -> Option<Vec<u8>> {
match l.unpack() {
(0, [PalletInstance(i)]) => Some((b"Pallet", Compact::<u32>::from(*i as u32)).encode()),
(0, [PalletInstance(i)]) => Some((b"Pezpallet", Compact::<u32>::from(*i as u32)).encode()),
_ => return None,
}
}
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Pezkuwi. If not, see <http://www.gnu.org/licenses/>.
//! Tests for the integration between `PayOverXcm` and the salary pallet
//! Tests for the integration between `PayOverXcm` and the salary pezpallet
use super::{mock::*, *};
@@ -116,7 +116,7 @@ impl pezpallet_salary::Config for Test {
}
/// Scenario:
/// The salary pallet is used to pay a member over XCM.
/// The salary pezpallet is used to pay a member over XCM.
/// The correct XCM message is generated and when executed in the remote chain,
/// the member receives the salary.
#[test]
@@ -130,7 +130,7 @@ fn salary_pay_over_xcm_works() {
// Check starting balance
assert_eq!(mock::Assets::balance(AssetIdGeneralIndex::get(), &recipient.clone()), 0);
// Use salary pallet to call `PayOverXcm::pay`
// Use salary pezpallet to call `PayOverXcm::pay`
assert_ok!(Salary::init(RuntimeOrigin::signed(recipient.clone())));
run_to(5);
assert_ok!(Salary::induct(RuntimeOrigin::signed(recipient.clone())));
+5 -5
View File
@@ -1613,15 +1613,15 @@ impl<Config: config::Config> XcmExecutor<Config> {
Ok(())
},
ExpectPallet { index, name, module_name, crate_major, min_crate_minor } => {
let pallet = Config::PalletInstancesInfo::infos()
let pezpallet = Config::PalletInstancesInfo::infos()
.into_iter()
.find(|x| x.index == index as usize)
.ok_or(XcmError::PalletNotFound)?;
ensure!(pallet.name.as_bytes() == &name[..], XcmError::NameMismatch);
ensure!(pallet.module_name.as_bytes() == &module_name[..], XcmError::NameMismatch);
let major = pallet.crate_version.major as u32;
ensure!(pezpallet.name.as_bytes() == &name[..], XcmError::NameMismatch);
ensure!(pezpallet.module_name.as_bytes() == &module_name[..], XcmError::NameMismatch);
let major = pezpallet.crate_version.major as u32;
ensure!(major == crate_major, XcmError::VersionIncompatible);
let minor = pallet.crate_version.minor as u32;
let minor = pezpallet.crate_version.minor as u32;
ensure!(minor >= min_crate_minor, XcmError::VersionIncompatible);
Ok(())
},
@@ -145,5 +145,5 @@ pub fn relay_ext() -> pezsp_io::TestExternalities {
ext
}
pub type RelayChainPalletXcm = pezpallet_xcm::Pallet<relay_chain::Runtime>;
pub type TeyrchainPalletXcm = pezpallet_xcm::Pallet<teyrchain::Runtime>;
pub type RelayChainPalletXcm = pezpallet_xcm::Pezpallet<relay_chain::Runtime>;
pub type TeyrchainPalletXcm = pezpallet_xcm::Pezpallet<teyrchain::Runtime>;
@@ -134,7 +134,7 @@ parameter_types! {
pub const MessageQueueMaxStale: u32 = 16;
}
/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet.
/// Message processor to handle any messages that were enqueued into the `MessageQueue` pezpallet.
pub struct MessageProcessor;
impl ProcessMessage for MessageProcessor {
type Origin = AggregateMessageOrigin;
@@ -151,7 +151,7 @@ fn reserve_transfer() {
ParaA::execute_with(|| {
// free execution, full amount received
assert_eq!(
pezpallet_balances::Pallet::<teyrchain::Runtime>::free_balance(&ALICE),
pezpallet_balances::Pezpallet::<teyrchain::Runtime>::free_balance(&ALICE),
INITIAL_BALANCE + withdraw_amount
);
});
@@ -201,7 +201,7 @@ fn reserve_transfer_with_error() {
// Ensure no balance change due to the error
ParaA::execute_with(|| {
assert_eq!(
pezpallet_balances::Pallet::<teyrchain::Runtime>::free_balance(&ALICE),
pezpallet_balances::Pezpallet::<teyrchain::Runtime>::free_balance(&ALICE),
INITIAL_BALANCE
);
});
@@ -153,8 +153,8 @@ pub fn relay_ext() -> pezsp_io::TestExternalities {
ext
}
pub type RelayChainPalletXcm = pezpallet_xcm::Pallet<relay_chain::Runtime>;
pub type TeyrchainPalletXcm = pezpallet_xcm::Pallet<teyrchain::Runtime>;
pub type RelayChainPalletXcm = pezpallet_xcm::Pezpallet<relay_chain::Runtime>;
pub type TeyrchainPalletXcm = pezpallet_xcm::Pezpallet<teyrchain::Runtime>;
// We check XCM messages recursively for blocklisted messages
fn recursively_matches_blocklisted_messages(message: &Instruction<()>) -> bool {
@@ -192,7 +192,7 @@ parameter_types! {
pub const MessageQueueMaxStale: u32 = 16;
}
/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet.
/// Message processor to handle any messages that were enqueued into the `MessageQueue` pezpallet.
pub struct MessageProcessor;
impl ProcessMessage for MessageProcessor {
type Origin = AggregateMessageOrigin;
@@ -150,33 +150,33 @@ impl Config for XcmConfig {
type XcmRecorder = ();
}
#[pezframe_support::pallet]
#[pezframe_support::pezpallet]
pub mod mock_msg_queue {
use super::*;
use pezframe_support::pezpallet_prelude::*;
#[pallet::config]
#[pezpallet::config]
pub trait Config: pezframe_system::Config {
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type XcmExecutor: ExecuteXcm<Self::RuntimeCall>;
}
#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);
#[pezpallet::pezpallet]
#[pezpallet::without_storage_info]
pub struct Pezpallet<T>(_);
#[pallet::call]
impl<T: Config> Pallet<T> {}
#[pezpallet::call]
impl<T: Config> Pezpallet<T> {}
#[pallet::storage]
#[pezpallet::storage]
pub(super) type TeyrchainId<T: Config> = StorageValue<_, ParaId, ValueQuery>;
#[pallet::storage]
#[pezpallet::storage]
/// A queue of received DMP messages
pub(super) type ReceivedDmp<T: Config> = StorageValue<_, Vec<Xcm<T::RuntimeCall>>, ValueQuery>;
impl<T: Config> Get<ParaId> for Pallet<T> {
impl<T: Config> Get<ParaId> for Pezpallet<T> {
fn get() -> ParaId {
Self::teyrchain_id()
}
@@ -184,8 +184,8 @@ pub mod mock_msg_queue {
pub type MessageId = [u8; 32];
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
#[pezpallet::event]
#[pezpallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
// XCMP
/// Some XCM was executed OK.
@@ -206,7 +206,7 @@ pub mod mock_msg_queue {
ExecutedDownward(MessageId, Outcome),
}
impl<T: Config> Pallet<T> {
impl<T: Config> Pezpallet<T> {
pub fn teyrchain_id() -> ParaId {
TeyrchainId::<T>::get()
}
@@ -254,7 +254,7 @@ pub mod mock_msg_queue {
}
}
impl<T: Config> XcmpMessageHandler for Pallet<T> {
impl<T: Config> XcmpMessageHandler for Pezpallet<T> {
fn handle_xcmp_messages<'a, I: Iterator<Item = (ParaId, RelayBlockNumber, &'a [u8])>>(
iter: I,
max_weight: Weight,
@@ -279,7 +279,7 @@ pub mod mock_msg_queue {
}
}
impl<T: Config> DmpMessageHandler for Pallet<T> {
impl<T: Config> DmpMessageHandler for Pezpallet<T> {
fn handle_dmp_messages(
iter: impl Iterator<Item = (RelayBlockNumber, Vec<u8>)>,
limit: Weight,
@@ -26,35 +26,35 @@ use pezsp_runtime::traits::{Get, Hash};
use xcm::{latest::prelude::*, VersionedXcm};
pub use pallet::*;
pub use pezpallet::*;
#[pezframe_support::pallet]
pub mod pallet {
#[pezframe_support::pezpallet]
pub mod pezpallet {
use super::*;
use pezframe_support::pezpallet_prelude::*;
#[pallet::config]
#[pezpallet::config]
pub trait Config: pezframe_system::Config {
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type XcmExecutor: ExecuteXcm<Self::RuntimeCall>;
}
#[pallet::call]
impl<T: Config> Pallet<T> {}
#[pezpallet::call]
impl<T: Config> Pezpallet<T> {}
#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);
#[pezpallet::pezpallet]
#[pezpallet::without_storage_info]
pub struct Pezpallet<T>(_);
#[pallet::storage]
#[pezpallet::storage]
pub type TeyrchainId<T: Config> = StorageValue<_, ParaId, ValueQuery>;
#[pallet::storage]
#[pezpallet::storage]
/// A queue of received DMP messages
pub type ReceivedDmp<T: Config> = StorageValue<_, Vec<Xcm<T::RuntimeCall>>, ValueQuery>;
impl<T: Config> Get<ParaId> for Pallet<T> {
impl<T: Config> Get<ParaId> for Pezpallet<T> {
fn get() -> ParaId {
TeyrchainId::<T>::get()
}
@@ -62,8 +62,8 @@ pub mod pallet {
pub type MessageId = [u8; 32];
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
#[pezpallet::event]
#[pezpallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
// XCMP
/// Some XCM was executed OK.
@@ -84,7 +84,7 @@ pub mod pallet {
ExecutedDownward { message_id: MessageId, outcome: Outcome },
}
impl<T: Config> Pallet<T> {
impl<T: Config> Pezpallet<T> {
pub fn set_para_id(para_id: ParaId) {
TeyrchainId::<T>::put(para_id);
}
@@ -128,7 +128,7 @@ pub mod pallet {
}
}
impl<T: Config> XcmpMessageHandler for Pallet<T> {
impl<T: Config> XcmpMessageHandler for Pezpallet<T> {
fn handle_xcmp_messages<'a, I: Iterator<Item = (ParaId, RelayBlockNumber, &'a [u8])>>(
iter: I,
max_weight: xcm::latest::Weight,
@@ -153,7 +153,7 @@ pub mod pallet {
}
}
impl<T: Config> DmpMessageHandler for Pallet<T> {
impl<T: Config> DmpMessageHandler for Pezpallet<T> {
fn handle_dmp_messages(
iter: impl Iterator<Item = (RelayBlockNumber, Vec<u8>)>,
limit: Weight,
@@ -193,7 +193,7 @@ impl ContainsPair<Asset, Location> for NativeTokenToAssetHub {
/// Teyrchain id of Asset Hub.
pub const ASSET_HUB_PARA_ID: u32 = 1000;
/// The instance index of the trust-backed assets pallet in Asset Hub.
/// The instance index of the trust-backed assets pezpallet in Asset Hub.
pub const ASSET_HUB_ASSETS_PALLET_INSTANCE: u8 = 50;
/// Id of USDT in Asset Hub.
pub const USDT_ID: u32 = 1984;
@@ -598,18 +598,18 @@ pezsp_api::mock_impl_runtime_apis! {
call: RuntimeCall,
result_xcms_version: XcmVersion,
) -> Result<CallDryRunEffects<RuntimeEvent>, XcmDryRunApiError> {
pezpallet_xcm::Pallet::<TestRuntime>::dry_run_call::<TestRuntime, XcmRouter, OriginCaller, RuntimeCall>(origin, call, result_xcms_version)
pezpallet_xcm::Pezpallet::<TestRuntime>::dry_run_call::<TestRuntime, XcmRouter, OriginCaller, RuntimeCall>(origin, call, result_xcms_version)
}
fn dry_run_call_before_version_2(
origin: OriginCaller,
call: RuntimeCall,
) -> Result<CallDryRunEffects<RuntimeEvent>, XcmDryRunApiError> {
pezpallet_xcm::Pallet::<TestRuntime>::dry_run_call::<TestRuntime, XcmRouter, OriginCaller, RuntimeCall>(origin, call, xcm::latest::VERSION)
pezpallet_xcm::Pezpallet::<TestRuntime>::dry_run_call::<TestRuntime, XcmRouter, OriginCaller, RuntimeCall>(origin, call, xcm::latest::VERSION)
}
fn dry_run_xcm(origin_location: VersionedLocation, xcm: VersionedXcm<RuntimeCall>) -> Result<XcmDryRunEffects<RuntimeEvent>, XcmDryRunApiError> {
pezpallet_xcm::Pallet::<TestRuntime>::dry_run_xcm::<XcmRouter>(origin_location, xcm)
pezpallet_xcm::Pezpallet::<TestRuntime>::dry_run_xcm::<XcmRouter>(origin_location, xcm)
}
}
}