chore: regenerate umbrella crate, fix feature propagation

This commit is contained in:
2025-12-16 11:28:32 +03:00
parent dd6d48f528
commit 620b0e3aa0
1358 changed files with 9464 additions and 7656 deletions
+2 -2
View File
@@ -47,8 +47,8 @@
//! configurable.
//! - [`Builder`](xcm_builder): A collection of types used to configure 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.
//! - [`Simulator`](xcm_pez_simulator): A playground to tinker with different XCM programs and
//! executor configurations.
//!
//! XCM programs are composed of Instructions, which reference Locations and Assets.
//!
@@ -142,7 +142,8 @@ where
};
// Adjust gas using actual weight or fallback to initially charged weight
let actual_weight = pezframe_support::dispatch::extract_actual_weight(&result, &pre);
let actual_weight =
pezframe_support::dispatch::extract_actual_weight(&result, &pre);
env.adjust_gas(charged_amount, actual_weight);
result.map(|_| Vec::new()).map_err(|error| {
@@ -329,9 +329,13 @@ pub fn new_test_ext_with_balances_and_xcm_version(
.assimilate_storage(&mut t)
.unwrap();
pezpallet_xcm::GenesisConfig::<Test> { safe_xcm_version, supported_version, ..Default::default() }
.assimilate_storage(&mut t)
.unwrap();
pezpallet_xcm::GenesisConfig::<Test> {
safe_xcm_version,
supported_version,
..Default::default()
}
.assimilate_storage(&mut t)
.unwrap();
pezpallet_revive::GenesisConfig::<Test> { mapped_accounts: vec![ALICE], ..Default::default() }
.assimilate_storage(&mut t)
@@ -21,6 +21,7 @@ use crate::{
VersionedLocation, VersionedXcm,
};
use pezframe_support::traits::Currency;
use pezkuwi_teyrchain_primitives::primitives::Id as ParaId;
use pezpallet_revive::{
precompiles::{
alloy::{
@@ -31,7 +32,6 @@ use pezpallet_revive::{
},
ExecConfig, U256,
};
use pezkuwi_teyrchain_primitives::primitives::Id as ParaId;
use pezsp_runtime::traits::AccountIdConversion;
use xcm::{prelude::*, v3, v4};
+21 -11
View File
@@ -48,7 +48,6 @@ use pezframe_support::{
};
use pezframe_system::pezpallet_prelude::{BlockNumberFor, *};
pub use pezpallet::*;
use scale_info::TypeInfo;
use pezsp_core::H256;
use pezsp_runtime::{
traits::{
@@ -57,6 +56,7 @@ use pezsp_runtime::{
},
Either, RuntimeDebug, SaturatedConversion,
};
use scale_info::TypeInfo;
use storage::{with_transaction, TransactionOutcome};
use xcm::{latest::QueryResponseInfo, prelude::*};
use xcm_builder::{
@@ -255,7 +255,8 @@ pub mod pezpallet {
pub trait Config: pezframe_system::Config {
/// The overarching event type.
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
/// A lockable currency.
// TODO: We should really use a trait which can handle multiple currencies.
@@ -1722,7 +1723,8 @@ pub mod pezpallet {
if let Some(expiry) = expires {
ensure!(
expiry >
pezframe_system::Pezpallet::<T>::current_block_number().saturated_into::<u64>(),
pezframe_system::Pezpallet::<T>::current_block_number()
.saturated_into::<u64>(),
Error::<T>::ExpiresInPast
);
}
@@ -1970,7 +1972,10 @@ impl<T: Config> QueryHandler for Pezpallet<T> {
let response = response.into();
Queries::<T>::insert(
id,
QueryStatus::Ready { response, at: pezframe_system::Pezpallet::<T>::current_block_number() },
QueryStatus::Ready {
response,
at: pezframe_system::Pezpallet::<T>::current_block_number(),
},
);
}
}
@@ -3068,7 +3073,10 @@ impl<T: Config> Pezpallet<T> {
origin: OriginCaller,
call: RuntimeCall,
result_xcms_version: XcmVersion,
) -> Result<CallDryRunEffects<<Runtime as pezframe_system::Config>::RuntimeEvent>, XcmDryRunApiError>
) -> Result<
CallDryRunEffects<<Runtime as pezframe_system::Config>::RuntimeEvent>,
XcmDryRunApiError,
>
where
Runtime: crate::Config,
Router: InspectMessageQueues,
@@ -3456,7 +3464,8 @@ impl<T: Config> Pezpallet<T> {
aliaser
.expiry
.map(|expiry| {
pezframe_system::Pezpallet::<T>::current_block_number().saturated_into::<u64>() <
pezframe_system::Pezpallet::<T>::current_block_number()
.saturated_into::<u64>() <
expiry
})
.unwrap_or(true)
@@ -3492,10 +3501,10 @@ impl<T: Config> Pezpallet<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 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.
/// 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.
/// - `timeout`: The block number after which it is permissible for `notify` not to be called
/// even if a response is received.
///
@@ -4120,7 +4129,8 @@ impl<T: Config> OnResponse for Pezpallet<T> {
let dispatch_origin = Origin::Response(origin.clone()).into();
match call.dispatch(dispatch_origin) {
Ok(post_info) => {
let e = Event::Notified { query_id, pezpallet_index, call_index };
let e =
Event::Notified { query_id, pezpallet_index, call_index };
Self::deposit_event(e);
post_info.actual_weight
},
+3 -3
View File
@@ -455,9 +455,9 @@ pub mod v1 {
>;
}
/// When adding a new XCM version, we need to run this migration for `pezpallet_xcm` to ensure that all
/// previously stored data with pez_subkey prefix `XCM_VERSION-1` (and below) are migrated to the
/// `XCM_VERSION`.
/// When adding a new XCM version, we need to run this migration for `pezpallet_xcm` to ensure that
/// all previously stored data with pez_subkey prefix `XCM_VERSION-1` (and below) are migrated to
/// the `XCM_VERSION`.
///
/// NOTE: This migration can be permanently added to the runtime migrations.
pub struct MigrateToLatestXcmVersion<T>(core::marker::PhantomData<T>);
+9 -4
View File
@@ -68,7 +68,8 @@ pub mod pezpallet_test_notifier {
#[pezpallet::config]
pub trait Config: pezframe_system::Config + crate::Config {
#[allow(deprecated)]
type RuntimeEvent: IsType<<Self as pezframe_system::Config>::RuntimeEvent> + From<Event<Self>>;
type RuntimeEvent: IsType<<Self as pezframe_system::Config>::RuntimeEvent>
+ From<Event<Self>>;
type RuntimeOrigin: IsType<<Self as pezframe_system::Config>::RuntimeOrigin>
+ Into<Result<crate::Origin, <Self as Config>::RuntimeOrigin>>;
type RuntimeCall: IsType<<Self as crate::Config>::RuntimeCall> + From<Call<Self>>;
@@ -741,9 +742,13 @@ pub(crate) fn new_test_ext_with_balances_and_xcm_version(
.assimilate_storage(&mut t)
.unwrap();
pezpallet_xcm::GenesisConfig::<Test> { safe_xcm_version, supported_version, ..Default::default() }
.assimilate_storage(&mut t)
.unwrap();
pezpallet_xcm::GenesisConfig::<Test> {
safe_xcm_version,
supported_version,
..Default::default()
}
.assimilate_storage(&mut t)
.unwrap();
let mut ext = pezsp_io::TestExternalities::new(t);
ext.execute_with(|| System::set_block_number(1));
+7 -7
View File
@@ -407,9 +407,9 @@ impl From<WeightLimit> for Option<Weight> {
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
pub enum OriginKind {
/// Origin should just be the native dispatch origin representation for the sender in the
/// local runtime framework. For Pezcumulus/Frame chains this is the `Teyrchain` or `Relay` origin
/// if coming from a chain, though there may be others if the `MultiLocation` XCM origin has a
/// primary/native dispatch origin form.
/// local runtime framework. For Pezcumulus/Frame chains this is the `Teyrchain` or `Relay`
/// origin if coming from a chain, though there may be others if the `MultiLocation` XCM
/// origin has a primary/native dispatch origin form.
Native,
/// Origin should just be the standard account-based origin with the sovereign account of
@@ -421,8 +421,8 @@ pub enum OriginKind {
Superuser,
/// Origin should be interpreted as an XCM native origin and the `MultiLocation` should be
/// encoded directly in the dispatch origin unchanged. For Pezcumulus/Frame chains, this will be
/// the `pezpallet_xcm::Origin::Xcm` type.
/// encoded directly in the dispatch origin unchanged. For Pezcumulus/Frame chains, this will
/// be the `pezpallet_xcm::Origin::Xcm` type.
Xcm,
}
@@ -938,8 +938,8 @@ pub enum Instruction<Call> {
/// Ensure that a particular pezpallet with a particular version exists.
///
/// - `index: Compact`: The index which identifies the pezpallet. An error if no pezpallet exists at
/// this index.
/// - `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 pezpallet.
/// - `module_name: Vec<u8>`: Module name which must be equal to the name of the module in
/// which the pezpallet exists.
+2 -2
View File
@@ -32,8 +32,8 @@ 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 pezpallet on a Frame-based
/// Bizinikiwi chain.
/// - A logical functional component of a chain, e.g. a single instance of a pezpallet on a
/// Frame-based Bizinikiwi chain.
/// - An account.
///
/// A `MultiLocation` is a *relative identifier*, meaning that it can only be used to define the
+2 -2
View File
@@ -32,8 +32,8 @@ 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 pezpallet on a Frame-based
/// Bizinikiwi chain.
/// - A logical functional component of a chain, e.g. a single instance of a pezpallet on a
/// Frame-based Bizinikiwi chain.
/// - An account.
///
/// A `Location` is a *relative identifier*, meaning that it can only be used to define the
+2 -2
View File
@@ -899,8 +899,8 @@ pub enum Instruction<Call> {
/// Ensure that a particular pezpallet with a particular version exists.
///
/// - `index: Compact`: The index which identifies the pezpallet. An error if no pezpallet exists at
/// this index.
/// - `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 pezpallet.
/// - `module_name: Vec<u8>`: Module name which must be equal to the name of the module in
/// which the pezpallet exists.
+2 -2
View File
@@ -32,8 +32,8 @@ 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 pezpallet on a Frame-based
/// Bizinikiwi chain.
/// - A logical functional component of a chain, e.g. a single instance of a pezpallet on a
/// Frame-based Bizinikiwi chain.
/// - An account.
///
/// A `Location` is a *relative identifier*, meaning that it can only be used to define the
+2 -2
View File
@@ -857,8 +857,8 @@ pub enum Instruction<Call> {
/// Ensure that a particular pezpallet with a particular version exists.
///
/// - `index: Compact`: The index which identifies the pezpallet. An error if no pezpallet exists at
/// this index.
/// - `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 pezpallet.
/// - `module_name: Vec<u8>`: Module name which must be equal to the name of the module in
/// which the pezpallet exists.
@@ -269,8 +269,8 @@ impl ConvertLocation<AccountId> for AccountIndex64Aliases {
/// `Convert` implementation to convert from some a `Signed` (system) `Origin` into an
/// `AccountIndex64`.
///
/// Typically used when configuring `pezpallet-xcm` in tests to allow `u64` accounts to dispatch an XCM
/// from an `AccountIndex64` origin.
/// Typically used when configuring `pezpallet-xcm` in tests to allow `u64` accounts to dispatch an
/// XCM from an `AccountIndex64` origin.
pub struct SignedToAccountIndex64<RuntimeOrigin, AccountId, Network>(
PhantomData<(RuntimeOrigin, AccountId, Network)>,
);
@@ -58,7 +58,8 @@ pub struct DescribePalletTerminal;
impl DescribeLocation for DescribePalletTerminal {
fn describe_location(l: &Location) -> Option<Vec<u8>> {
match l.unpack() {
(0, [PalletInstance(i)]) => Some((b"Pezpallet", Compact::<u32>::from(*i as u32)).encode()),
(0, [PalletInstance(i)]) =>
Some((b"Pezpallet", Compact::<u32>::from(*i as u32)).encode()),
_ => return None,
}
}
@@ -290,8 +290,8 @@ where
/// `Convert` implementation to convert from some an origin which implements `Backing` into a
/// corresponding `Plurality` `Location`.
///
/// Typically used when configuring `pezpallet-xcm` for allowing a collective's Origin to dispatch an
/// XCM from a `Plurality` origin.
/// Typically used when configuring `pezpallet-xcm` for allowing a collective's Origin to dispatch
/// an XCM from a `Plurality` origin.
pub struct BackingToPlurality<RuntimeOrigin, COrigin, Body>(
PhantomData<(RuntimeOrigin, COrigin, Body)>,
);
@@ -22,8 +22,8 @@ use pezframe_support::{
dispatch::GetDispatchInfo,
traits::{ProcessMessage, ProcessMessageError},
};
use scale_info::TypeInfo;
use pezsp_weights::{Weight, WeightMeter};
use scale_info::TypeInfo;
use xcm::{prelude::*, MAX_XCM_DECODE_DEPTH};
const LOG_TARGET: &str = "xcm::process-message";
@@ -145,7 +145,9 @@ pub struct AssetKind {
}
pub struct LocatableAssetKindConverter;
impl pezsp_runtime::traits::TryConvert<AssetKind, LocatableAssetId> for LocatableAssetKindConverter {
impl pezsp_runtime::traits::TryConvert<AssetKind, LocatableAssetId>
for LocatableAssetKindConverter
{
fn try_convert(value: AssetKind) -> Result<LocatableAssetId, AssetKind> {
Ok(LocatableAssetId { asset_id: value.asset_id, location: value.destination })
}
+4 -2
View File
@@ -21,8 +21,8 @@ use pezframe_support::{
weights::Weight,
};
use pezframe_system::EnsureRoot;
use primitive_types::H256;
use pezsp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage};
use primitive_types::H256;
use pezkuwi_runtime_teyrchains::{configuration, origin, shared};
use pezkuwi_teyrchain_primitives::primitives::Id as ParaId;
@@ -245,7 +245,9 @@ construct_runtime!(
}
);
pub fn kusama_like_with_balances(balances: Vec<(AccountId, Balance)>) -> pezsp_io::TestExternalities {
pub fn kusama_like_with_balances(
balances: Vec<(AccountId, Balance)>,
) -> pezsp_io::TestExternalities {
let mut t = pezframe_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
pezpallet_balances::GenesisConfig::<Runtime> { balances, ..Default::default() }
@@ -128,7 +128,8 @@ fn transact_recursion_limit_works() {
let mut block_builder = client.init_pezkuwi_block_builder();
let execute = construct_extrinsic(&client, call.unwrap(), pezsp_keyring::Sr25519Keyring::Alice, 0);
let execute =
construct_extrinsic(&client, call.unwrap(), pezsp_keyring::Sr25519Keyring::Alice, 0);
block_builder.push_pezkuwi_extrinsic(execute).expect("pushes extrinsic");
@@ -168,9 +169,9 @@ fn transact_recursion_limit_works() {
#[test]
fn query_response_fires() {
use pezkuwi_test_runtime::RuntimeEvent::TestNotifier;
use pezpallet_test_notifier::Event::*;
use pezpallet_xcm::QueryStatus;
use pezkuwi_test_runtime::RuntimeEvent::TestNotifier;
pezsp_tracing::try_init_simple();
let client = TestClientBuilder::new().build();
@@ -251,8 +252,8 @@ fn query_response_fires() {
#[test]
fn query_response_elicits_handler() {
use pezpallet_test_notifier::Event::*;
use pezkuwi_test_runtime::RuntimeEvent::TestNotifier;
use pezpallet_test_notifier::Event::*;
pezsp_tracing::try_init_simple();
let client = TestClientBuilder::new().build();
@@ -16,8 +16,8 @@
use crate::traits::TransactAsset;
use pezframe_support::traits::ContainsPair;
use scale_info::TypeInfo;
use pezsp_runtime::codec::{Decode, DecodeWithMemTracking, Encode};
use scale_info::TypeInfo;
use xcm::prelude::*;
/// Errors related to determining asset transfer support.
+1 -1
View File
@@ -55,9 +55,9 @@ mod record_xcm;
mod weight;
pub use event_emitter::EventEmitter;
pub use record_xcm::RecordXcm;
#[deprecated = "Use `pezsp_runtime::traits::` instead"]
pub use pezsp_runtime::traits::{Identity, TryConvertInto as JustTry};
pub use record_xcm::RecordXcm;
pub use weight::{WeightBounds, WeightTrader};
pub mod prelude {
@@ -17,7 +17,7 @@
use crate::{Junctions::Here, Xcm};
use codec::{Decode, Encode};
use core::{fmt::Debug, result};
use pezframe_support::{pezpallet_prelude::Get, parameter_types};
use pezframe_support::{parameter_types, pezpallet_prelude::Get};
use pezsp_arithmetic::traits::Zero;
use xcm::latest::{
Error as XcmError, InteriorLocation, Location, QueryId, Response, Result as XcmResult, Weight,
@@ -84,12 +84,18 @@ pub fn child_account_id(para: u32) -> relay_chain::AccountId {
relay_chain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
}
pub fn child_account_account_id(para: u32, who: pezsp_runtime::AccountId32) -> relay_chain::AccountId {
pub fn child_account_account_id(
para: u32,
who: pezsp_runtime::AccountId32,
) -> relay_chain::AccountId {
let location = (Teyrchain(para), AccountId32 { network: None, id: who.into() });
relay_chain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
}
pub fn sibling_account_account_id(para: u32, who: pezsp_runtime::AccountId32) -> teyrchain::AccountId {
pub fn sibling_account_account_id(
para: u32,
who: pezsp_runtime::AccountId32,
) -> teyrchain::AccountId {
let location = (Parent, Teyrchain(para), AccountId32 { network: None, id: who.into() });
teyrchain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
}
@@ -92,7 +92,10 @@ fn ump() {
});
Relay::execute_with(|| {
assert!(system_contains_event!(relay_chain, System(pezframe_system::Event::Remarked { .. })));
assert!(system_contains_event!(
relay_chain,
System(pezframe_system::Event::Remarked { .. })
));
});
}
@@ -190,8 +193,10 @@ fn reserve_transfer_with_error() {
assert!(log_capture.contains("XCM validate_send failed"));
// Verify that XcmPallet::Attempted was NOT emitted (rollback happened)
let xcm_attempted_emitted =
system_contains_event!(relay_chain, XcmPallet(pezpallet_xcm::Event::Attempted { .. }));
let xcm_attempted_emitted = system_contains_event!(
relay_chain,
XcmPallet(pezpallet_xcm::Event::Attempted { .. })
);
assert!(
!xcm_attempted_emitted,
"Expected no XcmPallet::Attempted event due to rollback, but it was emitted"
@@ -30,11 +30,11 @@ use pezsp_runtime::{
MultiAddress, MultiSignature,
};
use pezpallet_xcm::XcmPassthrough;
use pezkuwi_core_primitives::BlockNumber as RelayBlockNumber;
use pezkuwi_teyrchain_primitives::primitives::{
DmpMessageHandler, Id as ParaId, Sibling, XcmpMessageFormat, XcmpMessageHandler,
};
use pezpallet_xcm::XcmPassthrough;
use xcm::{latest::prelude::*, VersionedXcm};
use xcm_builder::{
AccountId32Aliases, AllowUnpaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible,
@@ -158,7 +158,8 @@ pub mod mock_msg_queue {
#[pezpallet::config]
pub trait Config: pezframe_system::Config {
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type XcmExecutor: ExecuteXcm<Self::RuntimeCall>;
}
@@ -36,7 +36,8 @@ pub mod pezpallet {
#[pezpallet::config]
pub trait Config: pezframe_system::Config {
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type XcmExecutor: ExecuteXcm<Self::RuntimeCall>;
}
@@ -16,6 +16,7 @@
mod mock;
use mock::*;
use pezframe_support::{
assert_err, assert_ok,
pezsp_runtime::{
@@ -24,7 +25,6 @@ use pezframe_support::{
AccountId32, MultiSignature,
},
};
use mock::*;
use pezsp_api::ProvideRuntimeApi;
use xcm::prelude::*;
use xcm_runtime_pezapis::conversions::{
@@ -425,7 +425,10 @@ fn dry_run_xcm_common(xcm_version: XcmVersion) {
account: 2100,
free_balance: 520
}),
RuntimeEvent::Balances(pezpallet_balances::Event::Minted { who: 2100, amount: 520 }),
RuntimeEvent::Balances(pezpallet_balances::Event::Minted {
who: 2100,
amount: 520
}),
RuntimeEvent::XcmPallet(pezpallet_xcm::Event::Sent {
origin: (who,).into(),
destination: (Parent, Teyrchain(2100)).into(),
+10 -4
View File
@@ -43,13 +43,13 @@ use xcm_executor::{
XcmExecutor,
};
use xcm_pez_simulator::helpers::derive_topic_id;
use xcm_runtime_pezapis::{
conversions::{Error as LocationToAccountApiError, LocationToAccountApi},
dry_run::{CallDryRunEffects, DryRunApi, Error as XcmDryRunApiError, XcmDryRunEffects},
fees::{Error as XcmPaymentApiError, XcmPaymentApi},
trusted_query::{Error as TrustedQueryApiError, TrustedQueryApi},
};
use xcm_pez_simulator::helpers::derive_topic_id;
construct_runtime! {
pub enum TestRuntime {
@@ -468,8 +468,12 @@ impl pezpallet_xcm::Config for TestRuntime {
}
#[allow(dead_code)]
pub fn new_test_ext_with_balances(balances: Vec<(AccountId, Balance)>) -> pezsp_io::TestExternalities {
let mut t = pezframe_system::GenesisConfig::<TestRuntime>::default().build_storage().unwrap();
pub fn new_test_ext_with_balances(
balances: Vec<(AccountId, Balance)>,
) -> pezsp_io::TestExternalities {
let mut t = pezframe_system::GenesisConfig::<TestRuntime>::default()
.build_storage()
.unwrap();
pezpallet_balances::GenesisConfig::<TestRuntime> { balances, ..Default::default() }
.assimilate_storage(&mut t)
@@ -485,7 +489,9 @@ pub fn new_test_ext_with_balances_and_assets(
balances: Vec<(AccountId, Balance)>,
assets: Vec<(AssetIdForAssetsPallet, AccountId, Balance)>,
) -> pezsp_io::TestExternalities {
let mut t = pezframe_system::GenesisConfig::<TestRuntime>::default().build_storage().unwrap();
let mut t = pezframe_system::GenesisConfig::<TestRuntime>::default()
.build_storage()
.unwrap();
pezpallet_balances::GenesisConfig::<TestRuntime> { balances, ..Default::default() }
.assimilate_storage(&mut t)
@@ -20,8 +20,8 @@
mod mock;
use pezframe_support::pezsp_runtime::testing::H256;
use mock::*;
use pezframe_support::pezsp_runtime::testing::H256;
use pezsp_api::ProvideRuntimeApi;
use xcm::{prelude::*, v3};
use xcm_runtime_pezapis::trusted_query::{Error, TrustedQueryApi};