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:
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "pallet-xcm-benchmarks"
|
||||
name = "pezpallet-xcm-benchmarks"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
@@ -16,41 +16,41 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { workspace = true }
|
||||
frame-benchmarking = { workspace = true }
|
||||
frame-support = { workspace = true }
|
||||
frame-system = { workspace = true }
|
||||
pezframe-benchmarking = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
pezframe-system = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
sp-io = { workspace = true }
|
||||
sp-runtime = { workspace = true }
|
||||
pezsp-io = { workspace = true }
|
||||
pezsp-runtime = { workspace = true }
|
||||
xcm = { workspace = true }
|
||||
xcm-builder = { workspace = true }
|
||||
xcm-executor = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
pallet-balances = { workspace = true, default-features = true }
|
||||
sp-tracing = { workspace = true, default-features = true }
|
||||
pezpallet-balances = { workspace = true, default-features = true }
|
||||
pezsp-tracing = { workspace = true, default-features = true }
|
||||
xcm = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame-benchmarking/std",
|
||||
"frame-support/std",
|
||||
"frame-system/std",
|
||||
"pezframe-benchmarking/std",
|
||||
"pezframe-support/std",
|
||||
"pezframe-system/std",
|
||||
"scale-info/std",
|
||||
"sp-io/std",
|
||||
"sp-runtime/std",
|
||||
"pezsp-io/std",
|
||||
"pezsp-runtime/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame-benchmarking/runtime-benchmarks",
|
||||
"frame-support/runtime-benchmarks",
|
||||
"frame-system/runtime-benchmarks",
|
||||
"pallet-balances/runtime-benchmarks",
|
||||
"sp-io/runtime-benchmarks",
|
||||
"sp-runtime/runtime-benchmarks",
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
"pezsp-io/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
"xcm-builder/runtime-benchmarks",
|
||||
"xcm-executor/runtime-benchmarks",
|
||||
"xcm/runtime-benchmarks",
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
use super::*;
|
||||
use crate::{account_and_location, new_executor, AssetTransactorOf, EnsureDelivery, XcmCallOf};
|
||||
use alloc::{vec, vec::Vec};
|
||||
use frame_benchmarking::{benchmarks_instance_pallet, BenchmarkError, BenchmarkResult};
|
||||
use frame_support::{
|
||||
pallet_prelude::Get,
|
||||
use pezframe_benchmarking::{benchmarks_instance_pallet, BenchmarkError, BenchmarkResult};
|
||||
use pezframe_support::{
|
||||
pezpallet_prelude::Get,
|
||||
traits::fungible::{Inspect, Mutate},
|
||||
weights::Weight,
|
||||
BoundedVec,
|
||||
};
|
||||
use sp_runtime::traits::Bounded;
|
||||
use pezsp_runtime::traits::Bounded;
|
||||
use xcm::latest::{prelude::*, AssetTransferFilter, MAX_ITEMS_IN_ASSETS};
|
||||
use xcm_executor::traits::{ConvertLocation, FeeReason, TransactAsset};
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
//! A mock runtime for XCM benchmarking.
|
||||
|
||||
use crate::{fungible as xcm_balances_benchmark, generate_holding_assets, mock::*};
|
||||
use frame_benchmarking::BenchmarkError;
|
||||
use frame_support::{
|
||||
use pezframe_benchmarking::BenchmarkError;
|
||||
use pezframe_support::{
|
||||
derive_impl, parameter_types,
|
||||
traits::{Everything, Nothing},
|
||||
};
|
||||
@@ -27,30 +27,30 @@ use xcm_builder::{
|
||||
AllowUnpaidExecutionFrom, EnsureDecodableXcm, FrameTransactionalProcessor, MintLocation,
|
||||
};
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
type Block = pezframe_system::mocking::MockBlock<Test>;
|
||||
|
||||
// For testing the pallet, we construct a mock runtime.
|
||||
frame_support::construct_runtime!(
|
||||
pezframe_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
System: pezframe_system,
|
||||
Balances: pezpallet_balances,
|
||||
XcmBalancesBenchmark: xcm_balances_benchmark,
|
||||
}
|
||||
);
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
|
||||
impl frame_system::Config for Test {
|
||||
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
|
||||
impl pezframe_system::Config for Test {
|
||||
type Block = Block;
|
||||
type AccountData = pallet_balances::AccountData<u64>;
|
||||
type AccountData = pezpallet_balances::AccountData<u64>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const ExistentialDeposit: u64 = 7;
|
||||
}
|
||||
|
||||
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
|
||||
impl pallet_balances::Config for Test {
|
||||
#[derive_impl(pezpallet_balances::config_preludes::TestDefaultConfig)]
|
||||
impl pezpallet_balances::Config for Test {
|
||||
type ReserveIdentifier = [u8; 8];
|
||||
type AccountStore = System;
|
||||
}
|
||||
@@ -66,7 +66,7 @@ parameter_types! {
|
||||
pub struct MatchAnyFungible;
|
||||
impl xcm_executor::traits::MatchesFungible<u64> for MatchAnyFungible {
|
||||
fn matches_fungible(m: &Asset) -> Option<u64> {
|
||||
use sp_runtime::traits::SaturatedConversion;
|
||||
use pezsp_runtime::traits::SaturatedConversion;
|
||||
match m {
|
||||
Asset { fun: Fungible(amount), .. } => Some((*amount).saturated_into::<u64>()),
|
||||
_ => None,
|
||||
@@ -173,9 +173,9 @@ impl xcm_balances_benchmark::Config for Test {
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub fn new_test_ext() -> sp_io::TestExternalities {
|
||||
use sp_runtime::BuildStorage;
|
||||
pub fn new_test_ext() -> pezsp_io::TestExternalities {
|
||||
use pezsp_runtime::BuildStorage;
|
||||
let t = RuntimeGenesisConfig { ..Default::default() }.build_storage().unwrap();
|
||||
sp_tracing::try_init_simple();
|
||||
pezsp_tracing::try_init_simple();
|
||||
t.into()
|
||||
}
|
||||
|
||||
@@ -23,15 +23,15 @@ pub mod benchmarking;
|
||||
#[cfg(test)]
|
||||
mod mock;
|
||||
|
||||
#[frame_support::pallet]
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
use frame_support::pallet_prelude::Get;
|
||||
use pezframe_support::pezpallet_prelude::Get;
|
||||
#[pallet::config]
|
||||
pub trait Config<I: 'static = ()>: frame_system::Config + crate::Config {
|
||||
pub trait Config<I: 'static = ()>: pezframe_system::Config + crate::Config {
|
||||
/// The type of `fungible` that is being used under the hood.
|
||||
///
|
||||
/// This is useful for testing and checking.
|
||||
type TransactAsset: frame_support::traits::fungible::Mutate<Self::AccountId>;
|
||||
type TransactAsset: pezframe_support::traits::fungible::Mutate<Self::AccountId>;
|
||||
|
||||
/// The account used to check assets being teleported.
|
||||
type CheckedAccount: Get<Option<(Self::AccountId, xcm_builder::MintLocation)>>;
|
||||
|
||||
@@ -19,8 +19,8 @@ use super::*;
|
||||
use crate::{account_and_location, new_executor, EnsureDelivery, XcmCallOf};
|
||||
use alloc::{vec, vec::Vec};
|
||||
use codec::Encode;
|
||||
use frame_benchmarking::v2::*;
|
||||
use frame_support::{traits::fungible::Inspect, BoundedVec};
|
||||
use pezframe_benchmarking::v2::*;
|
||||
use pezframe_support::{traits::fungible::Inspect, BoundedVec};
|
||||
use xcm::{
|
||||
latest::{prelude::*, MaxDispatchErrorLen, MaybeErrorCode, Weight, MAX_ITEMS_IN_ASSETS},
|
||||
DoubleEncoded,
|
||||
@@ -727,7 +727,7 @@ mod benchmarks {
|
||||
{
|
||||
executor.bench_process(xcm)?;
|
||||
}
|
||||
use frame_support::traits::Get;
|
||||
use pezframe_support::traits::Get;
|
||||
let universal_location = <T::XcmConfig as xcm_executor::Config>::UniversalLocation::get();
|
||||
assert_eq!(
|
||||
executor.origin(),
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
use crate::{generic, mock::*, *};
|
||||
use codec::Decode;
|
||||
use frame_support::{
|
||||
use pezframe_support::{
|
||||
derive_impl, parameter_types,
|
||||
traits::{Contains, Everything, OriginTrait},
|
||||
};
|
||||
use sp_runtime::traits::TrailingZeroInput;
|
||||
use pezsp_runtime::traits::TrailingZeroInput;
|
||||
use xcm_builder::{
|
||||
test_utils::{
|
||||
AssetsInHolding, TestAssetExchanger, TestAssetLocker, TestAssetTrap,
|
||||
@@ -33,21 +33,21 @@ use xcm_builder::{
|
||||
};
|
||||
use xcm_executor::traits::ConvertOrigin;
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
type Block = pezframe_system::mocking::MockBlock<Test>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pezframe_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
System: pezframe_system,
|
||||
Balances: pezpallet_balances,
|
||||
XcmGenericBenchmarks: generic,
|
||||
}
|
||||
);
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
|
||||
impl frame_system::Config for Test {
|
||||
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
|
||||
impl pezframe_system::Config for Test {
|
||||
type Block = Block;
|
||||
type AccountData = pallet_balances::AccountData<u64>;
|
||||
type AccountData = pezpallet_balances::AccountData<u64>;
|
||||
}
|
||||
|
||||
/// The benchmarks in this pallet should never need an asset transactor to begin with.
|
||||
@@ -118,8 +118,8 @@ parameter_types! {
|
||||
pub const ExistentialDeposit: u64 = 7;
|
||||
}
|
||||
|
||||
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
|
||||
impl pallet_balances::Config for Test {
|
||||
#[derive_impl(pezpallet_balances::config_preludes::TestDefaultConfig)]
|
||||
impl pezpallet_balances::Config for Test {
|
||||
type ReserveIdentifier = [u8; 8];
|
||||
type AccountStore = System;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ impl generic::Config for Test {
|
||||
|
||||
fn transact_origin_and_runtime_call(
|
||||
) -> Result<(Location, <Self as generic::Config>::RuntimeCall), BenchmarkError> {
|
||||
Ok((Default::default(), frame_system::Call::remark_with_event { remark: vec![] }.into()))
|
||||
Ok((Default::default(), pezframe_system::Call::remark_with_event { remark: vec![] }.into()))
|
||||
}
|
||||
|
||||
fn subscribe_origin() -> Result<Location, BenchmarkError> {
|
||||
@@ -196,10 +196,10 @@ impl generic::Config for Test {
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub fn new_test_ext() -> sp_io::TestExternalities {
|
||||
use sp_runtime::BuildStorage;
|
||||
pub fn new_test_ext() -> pezsp_io::TestExternalities {
|
||||
use pezsp_runtime::BuildStorage;
|
||||
let t = RuntimeGenesisConfig { ..Default::default() }.build_storage().unwrap();
|
||||
sp_tracing::try_init_simple();
|
||||
pezsp_tracing::try_init_simple();
|
||||
t.into()
|
||||
}
|
||||
|
||||
|
||||
@@ -21,26 +21,26 @@ pub mod benchmarking;
|
||||
#[cfg(test)]
|
||||
mod mock;
|
||||
|
||||
#[frame_support::pallet]
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
use frame_benchmarking::BenchmarkError;
|
||||
use frame_support::{dispatch::GetDispatchInfo, pallet_prelude::Encode};
|
||||
use sp_runtime::traits::Dispatchable;
|
||||
use pezframe_benchmarking::BenchmarkError;
|
||||
use pezframe_support::{dispatch::GetDispatchInfo, pezpallet_prelude::Encode};
|
||||
use pezsp_runtime::traits::Dispatchable;
|
||||
use xcm::latest::{
|
||||
Asset, Assets, InteriorLocation, Junction, Location, NetworkId, Response, WeightLimit,
|
||||
};
|
||||
|
||||
#[pallet::config]
|
||||
pub trait Config<I: 'static = ()>: frame_system::Config + crate::Config {
|
||||
pub trait Config<I: 'static = ()>: pezframe_system::Config + crate::Config {
|
||||
type RuntimeCall: Dispatchable<RuntimeOrigin = Self::RuntimeOrigin>
|
||||
+ GetDispatchInfo
|
||||
+ From<frame_system::Call<Self>>
|
||||
+ From<pezframe_system::Call<Self>>
|
||||
+ Encode;
|
||||
|
||||
/// The type of `fungible` that is being used under the hood.
|
||||
///
|
||||
/// This is useful for testing and checking.
|
||||
type TransactAsset: frame_support::traits::fungible::Mutate<Self::AccountId>;
|
||||
type TransactAsset: pezframe_support::traits::fungible::Mutate<Self::AccountId>;
|
||||
|
||||
/// The response which causes the most runtime weight.
|
||||
fn worst_case_response() -> (u64, Response);
|
||||
@@ -99,13 +99,13 @@ pub mod pallet {
|
||||
|
||||
/// Returns a valid pallet info for `ExpectPallet` or `QueryPallet` benchmark.
|
||||
///
|
||||
/// By default returns `frame_system::Pallet` info with expected pallet index `0`.
|
||||
fn valid_pallet() -> frame_support::traits::PalletInfoData {
|
||||
frame_support::traits::PalletInfoData {
|
||||
index: <frame_system::Pallet<Self> as frame_support::traits::PalletInfoAccess>::index(),
|
||||
name: <frame_system::Pallet<Self> as frame_support::traits::PalletInfoAccess>::name(),
|
||||
module_name: <frame_system::Pallet<Self> as frame_support::traits::PalletInfoAccess>::module_name(),
|
||||
crate_version: <frame_system::Pallet<Self> as frame_support::traits::PalletInfoAccess>::crate_version(),
|
||||
/// By default returns `pezframe_system::Pallet` info with expected pallet 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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ extern crate alloc;
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use codec::Encode;
|
||||
use frame_benchmarking::{account, BenchmarkError};
|
||||
use pezframe_benchmarking::{account, BenchmarkError};
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_builder::EnsureDelivery;
|
||||
use xcm_executor::{traits::ConvertLocation, Config as XcmConfig};
|
||||
@@ -34,7 +34,7 @@ pub mod generic;
|
||||
mod mock;
|
||||
|
||||
/// A base trait for all individual pallets
|
||||
pub trait Config: frame_system::Config {
|
||||
pub trait Config: pezframe_system::Config {
|
||||
/// The XCM configurations.
|
||||
///
|
||||
/// These might affect the execution of XCM messages, such as defining how the
|
||||
@@ -62,7 +62,7 @@ const SEED: u32 = 0;
|
||||
/// The XCM executor to use for doing stuff.
|
||||
pub type ExecutorOf<T> = xcm_executor::XcmExecutor<<T as Config>::XcmConfig>;
|
||||
/// The overarching call type.
|
||||
pub type RuntimeCallOf<T> = <T as frame_system::Config>::RuntimeCall;
|
||||
pub type RuntimeCallOf<T> = <T as pezframe_system::Config>::RuntimeCall;
|
||||
/// The asset transactor of our executor
|
||||
pub type AssetTransactorOf<T> = <<T as Config>::XcmConfig as XcmConfig>::AssetTransactor;
|
||||
/// The call type of executor's config. Should eventually resolve to the same overarching call type.
|
||||
@@ -104,7 +104,7 @@ pub fn new_executor<T: Config>(origin: Location) -> ExecutorOf<T> {
|
||||
}
|
||||
|
||||
/// Build a location from an account id.
|
||||
fn account_id_junction<T: frame_system::Config>(index: u32) -> Junction {
|
||||
fn account_id_junction<T: pezframe_system::Config>(index: u32) -> Junction {
|
||||
let account: T::AccountId = account("account", index, SEED);
|
||||
let mut encoded = account.encode();
|
||||
encoded.resize(32, 0u8);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Pezkuwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::*;
|
||||
use frame_support::{parameter_types, traits::ContainsPair};
|
||||
use pezframe_support::{parameter_types, traits::ContainsPair};
|
||||
use xcm::latest::Weight;
|
||||
|
||||
// An xcm sender/receiver akin to > /dev/null
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{header}}
|
||||
//! Autogenerated weights for `{{pallet}}`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION {{version}}
|
||||
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: `{{cmd.repeat}}`, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
|
||||
//! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}`
|
||||
//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}`
|
||||
|
||||
Reference in New Issue
Block a user