feat: Rebrand Polkadot/Substrate references to PezkuwiChain

This commit systematically rebrands various references from Parity Technologies'
Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk.

Key changes include:
- Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks.
- Modified internal documentation and code comments to reflect PezkuwiChain naming and structure.
- Replaced direct references to  with  or specific paths within the  for XCM, Pezkuwi, and other modules.
- Cleaned up deprecated  issue and PR references in various  and  files, particularly in  and  modules.
- Adjusted image and logo URLs in documentation to point to PezkuwiChain assets.
- Removed or rephrased comments related to external Polkadot/Substrate PRs and issues.

This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
This commit is contained in:
2025-12-14 00:04:10 +03:00
parent 286de54384
commit 1c0e57d984
9084 changed files with 997839 additions and 997557 deletions
+24 -24
View File
@@ -14,20 +14,20 @@ targets = ["x86_64-unknown-linux-gnu"]
codec = { features = ["derive"], workspace = true }
scale-info = { features = ["derive", "serde"], workspace = true }
frame-support = { workspace = true }
sp-api = { workspace = true }
sp-weights = { workspace = true }
pezframe-support = { workspace = true }
pezsp-api = { workspace = true }
pezsp-weights = { workspace = true }
xcm = { workspace = true }
xcm-executor = { workspace = true }
[dev-dependencies]
frame-system = { workspace = true }
pezframe-system = { workspace = true }
hex-literal = { workspace = true }
pallet-assets = { workspace = true }
pallet-balances = { workspace = true }
pallet-xcm = { workspace = true }
sp-io = { workspace = true }
sp-tracing = { workspace = true, default-features = true }
pezpallet-assets = { workspace = true }
pezpallet-balances = { workspace = true }
pezpallet-xcm = { workspace = true }
pezsp-io = { workspace = true }
pezsp-tracing = { workspace = true, default-features = true }
tracing = { workspace = true }
xcm-builder = { workspace = true }
xcm-simulator = { workspace = true, default-features = true }
@@ -36,28 +36,28 @@ xcm-simulator = { workspace = true, default-features = true }
default = ["std"]
std = [
"codec/std",
"frame-support/std",
"frame-system/std",
"pallet-assets/std",
"pallet-balances/std",
"pallet-xcm/std",
"pezframe-support/std",
"pezframe-system/std",
"pezpallet-assets/std",
"pezpallet-balances/std",
"pezpallet-xcm/std",
"scale-info/std",
"sp-api/std",
"sp-io/std",
"sp-weights/std",
"pezsp-api/std",
"pezsp-io/std",
"pezsp-weights/std",
"tracing/std",
"xcm-builder/std",
"xcm-executor/std",
"xcm/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"sp-api/runtime-benchmarks",
"sp-io/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
"pezpallet-assets/runtime-benchmarks",
"pezpallet-balances/runtime-benchmarks",
"pezpallet-xcm/runtime-benchmarks",
"pezsp-api/runtime-benchmarks",
"pezsp-io/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-simulator/runtime-benchmarks",
@@ -19,7 +19,7 @@
use alloc::vec::Vec;
use codec::{Decode, Encode};
use frame_support::pallet_prelude::{MaxEncodedLen, TypeInfo};
use pezframe_support::pezpallet_prelude::{MaxEncodedLen, TypeInfo};
use xcm::VersionedLocation;
/// Entry of an authorized aliaser for a local origin. The aliaser `location` is only authorized
@@ -30,7 +30,7 @@ pub struct OriginAliaser {
pub expiry: Option<u64>,
}
sp_api::decl_runtime_apis! {
pezsp_api::decl_runtime_apis! {
/// API for querying XCM authorized aliases
pub trait AuthorizedAliasersApi {
/// Returns locations allowed to alias into and act as `target`.
@@ -21,7 +21,7 @@ use scale_info::TypeInfo;
use xcm::VersionedLocation;
use xcm_executor::traits::ConvertLocation;
sp_api::decl_runtime_apis! {
pezsp_api::decl_runtime_apis! {
/// API for useful conversions between XCM `Location` and `AccountId`.
pub trait LocationToAccountApi<AccountId> where AccountId: Decode {
/// Converts `Location` to `AccountId`.
+2 -2
View File
@@ -20,7 +20,7 @@
use alloc::vec::Vec;
use codec::{Decode, Encode};
use frame_support::pallet_prelude::{DispatchResultWithPostInfo, TypeInfo};
use pezframe_support::pezpallet_prelude::{DispatchResultWithPostInfo, TypeInfo};
use xcm::prelude::*;
/// Effects of dry-running an extrinsic.
@@ -47,7 +47,7 @@ pub struct XcmDryRunEffects<Event> {
pub forwarded_xcms: Vec<(VersionedLocation, Vec<VersionedXcm<()>>)>,
}
sp_api::decl_runtime_apis! {
pezsp_api::decl_runtime_apis! {
/// API for dry-running extrinsics and XCM programs to get the programs that need to be passed to the fees API.
///
/// All calls return a vector of tuples (location, xcm) where each "xcm" is executed in "location".
+3 -3
View File
@@ -18,11 +18,11 @@
use alloc::vec::Vec;
use codec::{Decode, Encode};
use frame_support::pallet_prelude::TypeInfo;
use sp_weights::Weight;
use pezframe_support::pezpallet_prelude::TypeInfo;
use pezsp_weights::Weight;
use xcm::{Version, VersionedAssetId, VersionedAssets, VersionedLocation, VersionedXcm};
sp_api::decl_runtime_apis! {
pezsp_api::decl_runtime_apis! {
/// A trait of XCM payment API.
///
/// API provides functionality for obtaining:
@@ -18,13 +18,13 @@
//! Runtime API definition for checking if given <Asset, Location> is trusted reserve or teleporter.
use codec::{Decode, Encode};
use frame_support::pallet_prelude::TypeInfo;
use pezframe_support::pezpallet_prelude::TypeInfo;
use xcm::{VersionedAsset, VersionedLocation};
/// Result of [`TrustedQueryApi`] functions.
pub type XcmTrustedQueryResult = Result<bool, Error>;
sp_api::decl_runtime_apis! {
pezsp_api::decl_runtime_apis! {
/// API for querying trusted reserves and trusted teleporters.
pub trait TrustedQueryApi {
/// Returns if the location is a trusted reserve for the asset.
@@ -16,16 +16,16 @@
mod mock;
use frame_support::{
use pezframe_support::{
assert_err, assert_ok,
sp_runtime::{
pezsp_runtime::{
testing::H256,
traits::{IdentifyAccount, Verify},
AccountId32, MultiSignature,
},
};
use mock::*;
use sp_api::ProvideRuntimeApi;
use pezsp_api::ProvideRuntimeApi;
use xcm::prelude::*;
use xcm_runtime_apis::conversions::{
Error as LocationToAccountApiError, LocationToAccountApi, LocationToAccountHelper,
@@ -33,7 +33,7 @@ use xcm_runtime_apis::conversions::{
#[test]
fn convert_location_to_account_works() {
sp_io::TestExternalities::default().execute_with(|| {
pezsp_io::TestExternalities::default().execute_with(|| {
let client = TestClient {};
let runtime_api = client.runtime_api();
@@ -16,9 +16,9 @@
//! Tests for using both the XCM fee payment API and the dry-run API.
use frame_support::sp_runtime::testing::H256;
use frame_system::RawOrigin;
use sp_api::ProvideRuntimeApi;
use pezframe_support::pezsp_runtime::testing::H256;
use pezframe_system::RawOrigin;
use pezsp_api::ProvideRuntimeApi;
use xcm::prelude::*;
use xcm_runtime_apis::{
dry_run::{CallDryRunEffects, DryRunApi},
@@ -45,14 +45,14 @@ use xcm_simulator::fake_message_hash;
// Teyrchain(2000) -------------------------------------------> Teyrchain(1000)
#[test]
fn fee_estimation_for_teleport() {
sp_tracing::init_for_tests();
pezsp_tracing::init_for_tests();
let who = 1; // AccountId = u64.
let balances = vec![(who, 100 + DeliveryFees::get() + ExistentialDeposit::get())];
let assets = vec![(1, who, 50)];
new_test_ext_with_balances_and_assets(balances, assets).execute_with(|| {
let client = TestClient;
let runtime_api = client.runtime_api();
let call = RuntimeCall::XcmPallet(pallet_xcm::Call::transfer_assets {
let call = RuntimeCall::XcmPallet(pezpallet_xcm::Call::transfer_assets {
dest: Box::new(VersionedLocation::from((Parent, Teyrchain(1000)))),
beneficiary: Box::new(VersionedLocation::from(AccountId32 {
id: [0u8; 32],
@@ -101,32 +101,32 @@ fn fee_estimation_for_teleport() {
assert_eq!(
dry_run_effects.emitted_events,
vec![
RuntimeEvent::System(frame_system::Event::NewAccount {
RuntimeEvent::System(pezframe_system::Event::NewAccount {
account: 8660274132218572653 // TODO: Why is this not `1`?
}),
RuntimeEvent::Balances(pallet_balances::Event::Endowed {
RuntimeEvent::Balances(pezpallet_balances::Event::Endowed {
account: 8660274132218572653,
free_balance: 100
}),
RuntimeEvent::Balances(pallet_balances::Event::Minted {
RuntimeEvent::Balances(pezpallet_balances::Event::Minted {
who: 8660274132218572653,
amount: 100
}),
RuntimeEvent::AssetsPallet(pallet_assets::Event::Burned {
RuntimeEvent::AssetsPallet(pezpallet_assets::Event::Burned {
asset_id: 1,
owner: 1,
balance: 20
}),
RuntimeEvent::Balances(pallet_balances::Event::Burned { who: 1, amount: 100 }),
RuntimeEvent::XcmPallet(pallet_xcm::Event::Attempted {
RuntimeEvent::Balances(pezpallet_balances::Event::Burned { who: 1, amount: 100 }),
RuntimeEvent::XcmPallet(pezpallet_xcm::Event::Attempted {
outcome: Outcome::Complete { used: Weight::from_parts(400, 40) },
}),
RuntimeEvent::Balances(pallet_balances::Event::Burned { who: 1, amount: 20 }),
RuntimeEvent::XcmPallet(pallet_xcm::Event::FeesPaid {
RuntimeEvent::Balances(pezpallet_balances::Event::Burned { who: 1, amount: 20 }),
RuntimeEvent::XcmPallet(pezpallet_xcm::Event::FeesPaid {
paying: AccountIndex64 { index: 1, network: None }.into(),
fees: (Here, 20u128).into(),
}),
RuntimeEvent::XcmPallet(pallet_xcm::Event::Sent {
RuntimeEvent::XcmPallet(pezpallet_xcm::Event::Sent {
origin: AccountIndex64 { index: 1, network: None }.into(),
destination: (Parent, Teyrchain(1000)).into(),
message: send_message.clone(),
@@ -206,14 +206,14 @@ fn dry_run_reserve_asset_transfer_common(
expected_result_xcms_version: XcmVersion,
dry_run_call: impl FnOnce(&TestClient, OriginCaller, RuntimeCall) -> CallDryRunEffects<RuntimeEvent>,
) {
sp_tracing::init_for_tests();
pezsp_tracing::init_for_tests();
let who = 1; // AccountId = u64.
// Native token used for fees.
let balances = vec![(who, DeliveryFees::get() + ExistentialDeposit::get())];
// Relay token is the one we want to transfer.
let assets = vec![(1, who, 100)]; // id, account_id, balance.
new_test_ext_with_balances_and_assets(balances, assets).execute_with(|| {
let call = RuntimeCall::XcmPallet(pallet_xcm::Call::transfer_assets {
let call = RuntimeCall::XcmPallet(pezpallet_xcm::Call::transfer_assets {
dest: Box::new(
VersionedLocation::from((Parent, Teyrchain(1000)))
.into_version(input_xcm_version)
@@ -273,20 +273,20 @@ fn dry_run_reserve_asset_transfer_common(
assert_eq!(
dry_run_effects.emitted_events,
vec![
RuntimeEvent::AssetsPallet(pallet_assets::Event::Burned {
RuntimeEvent::AssetsPallet(pezpallet_assets::Event::Burned {
asset_id: 1,
owner: 1,
balance: 100
}),
RuntimeEvent::XcmPallet(pallet_xcm::Event::Attempted {
RuntimeEvent::XcmPallet(pezpallet_xcm::Event::Attempted {
outcome: Outcome::Complete { used: Weight::from_parts(200, 20) }
}),
RuntimeEvent::Balances(pallet_balances::Event::Burned { who: 1, amount: 20 }),
RuntimeEvent::XcmPallet(pallet_xcm::Event::FeesPaid {
RuntimeEvent::Balances(pezpallet_balances::Event::Burned { who: 1, amount: 20 }),
RuntimeEvent::XcmPallet(pezpallet_xcm::Event::FeesPaid {
paying: AccountIndex64 { index: 1, network: None }.into(),
fees: (Here, 20u128).into()
}),
RuntimeEvent::XcmPallet(pallet_xcm::Event::Sent {
RuntimeEvent::XcmPallet(pezpallet_xcm::Event::Sent {
origin: AccountIndex64 { index: 1, network: None }.into(),
destination: send_destination.clone(),
message: send_message.clone(),
@@ -341,7 +341,7 @@ fn dry_run_before_api_v2_reserve_asset_transfer() {
}
fn dry_run_xcm_common(xcm_version: XcmVersion) {
sp_tracing::init_for_tests();
pezsp_tracing::init_for_tests();
let who = 1; // AccountId = u64.
let transfer_amount = 100u128;
// We need to build the XCM to weigh it and then build the real XCM that can pay for fees.
@@ -419,14 +419,14 @@ fn dry_run_xcm_common(xcm_version: XcmVersion) {
assert_eq!(
dry_run_effects.emitted_events,
vec![
RuntimeEvent::Balances(pallet_balances::Event::Burned { who: 1, amount: 540 }),
RuntimeEvent::System(frame_system::Event::NewAccount { account: 2100 }),
RuntimeEvent::Balances(pallet_balances::Event::Endowed {
RuntimeEvent::Balances(pezpallet_balances::Event::Burned { who: 1, amount: 540 }),
RuntimeEvent::System(pezframe_system::Event::NewAccount { account: 2100 }),
RuntimeEvent::Balances(pezpallet_balances::Event::Endowed {
account: 2100,
free_balance: 520
}),
RuntimeEvent::Balances(pallet_balances::Event::Minted { who: 2100, amount: 520 }),
RuntimeEvent::XcmPallet(pallet_xcm::Event::Sent {
RuntimeEvent::Balances(pezpallet_balances::Event::Minted { who: 2100, amount: 520 }),
RuntimeEvent::XcmPallet(pezpallet_xcm::Event::Sent {
origin: (who,).into(),
destination: (Parent, Teyrchain(2100)).into(),
message: Xcm::default(),
@@ -480,7 +480,7 @@ fn calling_payment_api_with_a_lower_version_works() {
// Teyrchain(2000) -------------------------------------------> Teyrchain(1000)
#[test]
fn fee_estimation_for_usdt_reserve_transfer_in_usdt() {
sp_tracing::init_for_tests();
pezsp_tracing::init_for_tests();
let who = 1; // AccountId = u64.
let balances = vec![(who, DeliveryFees::get() + ExistentialDeposit::get())]; // Just enough for fees
let assets = vec![
@@ -505,7 +505,7 @@ fn fee_estimation_for_usdt_reserve_transfer_in_usdt() {
[PalletInstance(ASSET_HUB_ASSETS_PALLET_INSTANCE), GeneralIndex(USDT_ID.into())],
);
let call = RuntimeCall::XcmPallet(pallet_xcm::Call::transfer_assets {
let call = RuntimeCall::XcmPallet(pezpallet_xcm::Call::transfer_assets {
dest: Box::new(VersionedLocation::from((Parent, Teyrchain(1000)))),
beneficiary: Box::new(VersionedLocation::from(AccountId32 {
id: [0u8; 32],
+42 -42
View File
@@ -18,9 +18,9 @@
//! Implements both runtime APIs for fee estimation and getting the messages for transfers.
use core::{cell::RefCell, marker::PhantomData};
use frame_support::{
construct_runtime, derive_impl, parameter_types, sp_runtime,
sp_runtime::{
use pezframe_support::{
construct_runtime, derive_impl, parameter_types, pezsp_runtime,
pezsp_runtime::{
traits::{Get, IdentityLookup, MaybeEquivalence, TryConvert},
BuildStorage, SaturatedConversion,
},
@@ -30,8 +30,8 @@ use frame_support::{
},
weights::WeightToFee as WeightToFeeT,
};
use frame_system::{EnsureRoot, RawOrigin as SystemRawOrigin};
use pallet_xcm::TestWeightInfo;
use pezframe_system::{EnsureRoot, RawOrigin as SystemRawOrigin};
use pezpallet_xcm::TestWeightInfo;
use xcm::{prelude::*, Version as XcmVersion};
use xcm_builder::{
AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible,
@@ -53,51 +53,51 @@ use xcm_simulator::helpers::derive_topic_id;
construct_runtime! {
pub enum TestRuntime {
System: frame_system,
Balances: pallet_balances,
AssetsPallet: pallet_assets,
XcmPallet: pallet_xcm,
System: pezframe_system,
Balances: pezpallet_balances,
AssetsPallet: pezpallet_assets,
XcmPallet: pezpallet_xcm,
}
}
pub type TxExtension =
(frame_system::CheckWeight<TestRuntime>, frame_system::WeightReclaim<TestRuntime>);
(pezframe_system::CheckWeight<TestRuntime>, pezframe_system::WeightReclaim<TestRuntime>);
// we only use the hash type from this, so using the mock should be fine.
pub(crate) type Extrinsic = sp_runtime::generic::UncheckedExtrinsic<
pub(crate) type Extrinsic = pezsp_runtime::generic::UncheckedExtrinsic<
u64,
RuntimeCall,
sp_runtime::testing::UintAuthorityId,
pezsp_runtime::testing::UintAuthorityId,
TxExtension,
>;
type Block = sp_runtime::testing::Block<Extrinsic>;
type Block = pezsp_runtime::testing::Block<Extrinsic>;
type Balance = u128;
type AssetIdForAssetsPallet = u32;
type AccountId = u64;
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
impl frame_system::Config for TestRuntime {
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
impl pezframe_system::Config for TestRuntime {
type Block = Block;
type AccountId = AccountId;
type AccountData = pallet_balances::AccountData<Balance>;
type AccountData = pezpallet_balances::AccountData<Balance>;
type Lookup = IdentityLookup<AccountId>;
}
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
impl pallet_balances::Config for TestRuntime {
#[derive_impl(pezpallet_balances::config_preludes::TestDefaultConfig)]
impl pezpallet_balances::Config for TestRuntime {
type AccountStore = System;
type Balance = Balance;
type ExistentialDeposit = ExistentialDeposit;
}
// Assets instance
#[derive_impl(pallet_assets::config_preludes::TestDefaultConfig)]
impl pallet_assets::Config for TestRuntime {
#[derive_impl(pezpallet_assets::config_preludes::TestDefaultConfig)]
impl pezpallet_assets::Config for TestRuntime {
type AssetId = AssetIdForAssetsPallet;
type Balance = Balance;
type Currency = Balances;
type CreateOrigin = AsEnsureOriginWithArg<frame_system::EnsureSigned<AccountId>>;
type ForceOrigin = frame_system::EnsureRoot<AccountId>;
type CreateOrigin = AsEnsureOriginWithArg<pezframe_system::EnsureSigned<AccountId>>;
type ForceOrigin = pezframe_system::EnsureRoot<AccountId>;
type Holder = ();
type Freezer = ();
type AssetDeposit = ConstU128<1>;
@@ -244,7 +244,7 @@ impl ConvertLocation<AccountId> for SiblingChainToIndex64 {
pub type LocationToAccountId = (AccountIndex64Aliases<AnyNetwork, u64>, SiblingChainToIndex64);
pub type NativeTokenTransactor = FungibleAdapter<
// We use pallet-balances for handling this fungible asset.
// We use pezpallet-balances for handling this fungible asset.
Balances,
// The fungible asset handled by this transactor is the native token of the chain.
IsConcrete<HereLocation>,
@@ -288,7 +288,7 @@ impl MaybeEquivalence<Location, AssetIdForAssetsPallet> for LocationToAssetIdFor
/// AssetTransactor for handling assets other than the native one.
pub type AssetsTransactor = FungiblesAdapter<
// We use pallet-assets for handling the relay token.
// We use pezpallet-assets for handling the relay token.
AssetsPallet,
// Matches the relay token.
ConvertedConcreteId<AssetIdForAssetsPallet, Balance, LocationToAssetIdForAssetsPallet, JustTry>,
@@ -311,7 +311,7 @@ impl Contains<Location> for HereAndInnerLocations {
}
pub type Barrier = (
TakeWeightCredit, // We need this for pallet-xcm's extrinsics to work.
TakeWeightCredit, // We need this for pezpallet-xcm's extrinsics to work.
AllowTopLevelPaidExecutionFrom<HereAndInnerLocations>, /* TODO: Technically, we should allow
* messages from "AssetHub". */
);
@@ -440,7 +440,7 @@ where
/// sending/executing XCMs.
pub type LocalOriginToLocation = SignedToAccountIndex64<RuntimeOrigin, AccountId>;
impl pallet_xcm::Config for TestRuntime {
impl pezpallet_xcm::Config for TestRuntime {
type RuntimeEvent = RuntimeEvent;
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
type XcmRouter = XcmRouter;
@@ -454,7 +454,7 @@ impl pallet_xcm::Config for TestRuntime {
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
type AdvertisedXcmVersion = pezpallet_xcm::CurrentXcmVersion;
type AdminOrigin = EnsureRoot<AccountId>;
type TrustedLockers = ();
type SovereignAccountOf = ();
@@ -468,14 +468,14 @@ impl pallet_xcm::Config for TestRuntime {
}
#[allow(dead_code)]
pub fn new_test_ext_with_balances(balances: Vec<(AccountId, Balance)>) -> sp_io::TestExternalities {
let mut t = frame_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();
pallet_balances::GenesisConfig::<TestRuntime> { balances, ..Default::default() }
pezpallet_balances::GenesisConfig::<TestRuntime> { balances, ..Default::default() }
.assimilate_storage(&mut t)
.unwrap();
let mut ext = sp_io::TestExternalities::new(t);
let mut ext = pezsp_io::TestExternalities::new(t);
ext.execute_with(|| System::set_block_number(1));
ext
}
@@ -484,14 +484,14 @@ pub fn new_test_ext_with_balances(balances: Vec<(AccountId, Balance)>) -> sp_io:
pub fn new_test_ext_with_balances_and_assets(
balances: Vec<(AccountId, Balance)>,
assets: Vec<(AssetIdForAssetsPallet, AccountId, Balance)>,
) -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::<TestRuntime>::default().build_storage().unwrap();
) -> pezsp_io::TestExternalities {
let mut t = pezframe_system::GenesisConfig::<TestRuntime>::default().build_storage().unwrap();
pallet_balances::GenesisConfig::<TestRuntime> { balances, ..Default::default() }
pezpallet_balances::GenesisConfig::<TestRuntime> { balances, ..Default::default() }
.assimilate_storage(&mut t)
.unwrap();
pallet_assets::GenesisConfig::<TestRuntime> {
pezpallet_assets::GenesisConfig::<TestRuntime> {
assets: vec![
// id, owner, is_sufficient, min_balance.
// We don't actually need this to be sufficient, since we use the native assets in
@@ -511,7 +511,7 @@ pub fn new_test_ext_with_balances_and_assets(
.assimilate_storage(&mut t)
.unwrap();
let mut ext = sp_io::TestExternalities::new(t);
let mut ext = pezsp_io::TestExternalities::new(t);
ext.execute_with(|| System::set_block_number(1));
ext
}
@@ -523,14 +523,14 @@ pub(crate) struct RuntimeApi {
_inner: TestClient,
}
impl sp_api::ProvideRuntimeApi<Block> for TestClient {
impl pezsp_api::ProvideRuntimeApi<Block> for TestClient {
type Api = RuntimeApi;
fn runtime_api(&self) -> sp_api::ApiRef<'_, Self::Api> {
fn runtime_api(&self) -> pezsp_api::ApiRef<'_, Self::Api> {
RuntimeApi { _inner: self.clone() }.into()
}
}
sp_api::mock_impl_runtime_apis! {
pezsp_api::mock_impl_runtime_apis! {
impl TrustedQueryApi<Block> for RuntimeApi {
fn is_trusted_reserve(asset: VersionedAsset, location: VersionedLocation) -> Result<bool, TrustedQueryApiError> {
XcmPallet::is_trusted_reserve(asset, location)
@@ -598,18 +598,18 @@ sp_api::mock_impl_runtime_apis! {
call: RuntimeCall,
result_xcms_version: XcmVersion,
) -> Result<CallDryRunEffects<RuntimeEvent>, XcmDryRunApiError> {
pallet_xcm::Pallet::<TestRuntime>::dry_run_call::<TestRuntime, XcmRouter, OriginCaller, RuntimeCall>(origin, call, result_xcms_version)
pezpallet_xcm::Pallet::<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> {
pallet_xcm::Pallet::<TestRuntime>::dry_run_call::<TestRuntime, XcmRouter, OriginCaller, RuntimeCall>(origin, call, xcm::latest::VERSION)
pezpallet_xcm::Pallet::<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> {
pallet_xcm::Pallet::<TestRuntime>::dry_run_xcm::<XcmRouter>(origin_location, xcm)
pezpallet_xcm::Pallet::<TestRuntime>::dry_run_xcm::<XcmRouter>(origin_location, xcm)
}
}
}
@@ -20,9 +20,9 @@
mod mock;
use frame_support::sp_runtime::testing::H256;
use pezframe_support::pezsp_runtime::testing::H256;
use mock::*;
use sp_api::ProvideRuntimeApi;
use pezsp_api::ProvideRuntimeApi;
use xcm::{prelude::*, v3};
use xcm_runtime_apis::trusted_query::{Error, TrustedQueryApi};
@@ -36,7 +36,7 @@ fn query_trusted_reserve() {
expected: Result<bool, Error>,
}
sp_io::TestExternalities::default().execute_with(|| {
pezsp_io::TestExternalities::default().execute_with(|| {
let client = TestClient {};
let runtime_api = client.runtime_api();
@@ -98,7 +98,7 @@ fn query_trusted_teleporter() {
expected: Result<bool, Error>,
}
sp_io::TestExternalities::default().execute_with(|| {
pezsp_io::TestExternalities::default().execute_with(|| {
let client = TestClient {};
let runtime_api = client.runtime_api();