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
+1 -1
View File
@@ -24,7 +24,7 @@ use codec::{Decode, DecodeLimit, DecodeWithMemTracking, Encode};
#[codec(encode_bound())]
#[codec(decode_bound())]
#[scale_info(bounds(), skip_type_params(T))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
pub struct DoubleEncoded<T> {
encoded: Vec<u8>,
+4 -4
View File
@@ -17,7 +17,7 @@
//! Cross-Consensus Message format data structures.
// NOTE, this crate is meant to be used in many different environments, notably wasm, but not
// necessarily related to FRAME or even Substrate.
// necessarily related to FRAME or even Bizinikiwi.
//
// Hence, `no_std` rather than sp-runtime.
#![cfg_attr(not(feature = "std"), no_std)]
@@ -28,7 +28,7 @@ use codec::{
Decode, DecodeLimit, DecodeWithMemTracking, Encode, Error as CodecError, Input, MaxEncodedLen,
};
use derive_where::derive_where;
use frame_support::dispatch::GetDispatchInfo;
use pezframe_support::dispatch::GetDispatchInfo;
use scale_info::TypeInfo;
pub mod v3;
@@ -99,7 +99,7 @@ macro_rules! versioned_type {
#[derive(Clone, Eq, PartialEq, Debug, Encode, Decode, DecodeWithMemTracking, TypeInfo)]
#[codec(encode_bound())]
#[codec(decode_bound())]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
$(#[$attr])*
pub enum $n {
$(#[$index3])*
@@ -323,7 +323,7 @@ versioned_type! {
#[codec(encode_bound())]
#[codec(decode_bound())]
#[scale_info(bounds(), skip_type_params(RuntimeCall))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum VersionedXcm<RuntimeCall> {
#[codec(index = 3)]
V3(v3::Xcm<RuntimeCall>),
+1 -1
View File
@@ -255,7 +255,7 @@ fn encode_decode_versioned_xcm_v5() {
assert_eq!(xcm, decoded);
}
// With the renaming of the crate to `staging-xcm` the naming in the metadata changed as well and
// With the renaming of the crate to `pezstaging-xcm` the naming in the metadata changed as well and
// this broke downstream users. This test ensures that the name in the metadata isn't changed.
#[test]
fn ensure_type_info_is_correct() {
+5 -5
View File
@@ -47,7 +47,7 @@ use serde::{Deserialize, Serialize};
Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum NetworkId {
/// Network specified by the first 32 bytes of its genesis block.
ByGenesis([u8; 32]),
@@ -120,7 +120,7 @@ impl From<NewNetworkId> for NetworkId {
Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum BodyId {
/// The only body in its context.
Unit,
@@ -167,7 +167,7 @@ pub enum BodyId {
Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum BodyPart {
/// The body's declaration, under whatever means it decides.
Voice,
@@ -231,7 +231,7 @@ impl BodyPart {
Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum Junction {
/// An indexed teyrchain belonging to and operated by the context.
///
@@ -240,7 +240,7 @@ pub enum Junction {
/// A 32-byte identifier for an account of a specific network that is respected as a sovereign
/// endpoint within the context.
///
/// Generally used when the context is a Substrate-based chain.
/// Generally used when the context is a Bizinikiwi-based chain.
AccountId32 { network: Option<NetworkId>, id: [u8; 32] },
/// An 8-byte index for an account of a specific network that is respected as a sovereign
/// endpoint within the context.
+3 -3
View File
@@ -46,7 +46,7 @@ pub(crate) const MAX_JUNCTIONS: usize = 8;
serde::Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum Junctions {
/// The interpreting consensus system.
Here,
@@ -461,7 +461,7 @@ impl Junctions {
///
/// # Example
/// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation};
/// # use pezstaging_xcm::v3::{Junctions::*, Junction::*, MultiLocation};
/// let mut m = X1(Teyrchain(21));
/// assert_eq!(m.append_with(X1(PalletInstance(3))), Ok(()));
/// assert_eq!(m, X2(Teyrchain(21), PalletInstance(3)));
@@ -590,7 +590,7 @@ impl Junctions {
///
/// # Example
/// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*};
/// # use pezstaging_xcm::v3::{Junctions::*, Junction::*};
/// let mut m = X3(Teyrchain(2), PalletInstance(3), OnlyChild);
/// assert_eq!(m.match_and_split(&X2(Teyrchain(2), PalletInstance(3))), Some(&OnlyChild));
/// assert_eq!(m.match_and_split(&X1(Teyrchain(2))), None);
+16 -16
View File
@@ -61,7 +61,7 @@ pub type QueryId = u64;
#[derive_where(Clone, Eq, PartialEq, Debug)]
#[codec(encode_bound())]
#[scale_info(bounds(), skip_type_params(Call))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
pub struct Xcm<Call>(pub Vec<Instruction<Call>>);
@@ -220,7 +220,7 @@ parameter_types! {
#[derive(
Clone, Eq, PartialEq, Encode, Decode, DecodeWithMemTracking, Debug, TypeInfo, MaxEncodedLen,
)]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
pub struct PalletInfo {
#[codec(compact)]
@@ -270,7 +270,7 @@ impl TryInto<NewPalletInfo> for PalletInfo {
#[derive(
Clone, Eq, PartialEq, Encode, Decode, DecodeWithMemTracking, Debug, TypeInfo, MaxEncodedLen,
)]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
pub enum MaybeErrorCode {
Success,
@@ -297,7 +297,7 @@ impl Default for MaybeErrorCode {
#[derive(
Clone, Eq, PartialEq, Encode, Decode, DecodeWithMemTracking, Debug, TypeInfo, MaxEncodedLen,
)]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
pub enum Response {
/// No response. Serves as a neutral default.
@@ -331,8 +331,8 @@ impl TryFrom<NewResponse> for Response {
ExecutionResult(result) =>
Self::ExecutionResult(result.map(|(num, old_error)| (num, old_error.into()))),
Version(version) => Self::Version(version),
PalletsInfo(pallet_info) => {
let inner = pallet_info
PalletsInfo(pezpallet_info) => {
let inner = pezpallet_info
.into_iter()
.map(TryInto::try_into)
.collect::<result::Result<Vec<_>, _>>()?;
@@ -348,7 +348,7 @@ impl TryFrom<NewResponse> for Response {
/// Information regarding the composition of a query response.
#[derive(Clone, Eq, PartialEq, Encode, Decode, DecodeWithMemTracking, Debug, TypeInfo)]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
pub struct QueryResponseInfo {
/// The destination to which the query response message should be send.
@@ -374,7 +374,7 @@ impl TryFrom<NewQueryResponseInfo> for QueryResponseInfo {
/// An optional weight limit.
#[derive(Clone, Eq, PartialEq, Encode, Decode, DecodeWithMemTracking, Debug, TypeInfo)]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
pub enum WeightLimit {
/// No weight limit imposed.
@@ -403,26 +403,26 @@ impl From<WeightLimit> for Option<Weight> {
/// Basically just the XCM (more general) version of `TeyrchainDispatchOrigin`.
#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, DecodeWithMemTracking, Debug, TypeInfo)]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
#[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 Cumulus/Frame chains this is the `Teyrchain` or `Relay` origin
/// 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
/// the sender. For Cumulus/Frame chains, this is the `Signed` origin.
/// the sender. For Pezcumulus/Frame chains, this is the `Signed` origin.
SovereignAccount,
/// Origin should be the super-user. For Cumulus/Frame chains, this is the `Root` origin.
/// Origin should be the super-user. For Pezcumulus/Frame chains, this is the `Root` origin.
/// This will not usually be an available option.
Superuser,
/// Origin should be interpreted as an XCM native origin and the `MultiLocation` should be
/// encoded directly in the dispatch origin unchanged. For Cumulus/Frame chains, this will be
/// the `pallet_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,
}
@@ -474,7 +474,7 @@ impl XcmContext {
#[codec(decode_bound())]
#[codec(decode_with_mem_tracking_bound())]
#[scale_info(bounds(), skip_type_params(Call))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
pub enum Instruction<Call> {
/// Withdraw asset(s) (`assets`) from the ownership of `origin` and place them into the Holding
@@ -927,7 +927,7 @@ pub enum Instruction<Call> {
///
/// Sends a `QueryResponse` to Origin whose data field `PalletsInfo` containing the information
/// of all pallets on the local chain whose name is equal to `name`. This is empty in the case
/// that the local chain is not based on Substrate Frame.
/// that the local chain is not based on Bizinikiwi Frame.
///
/// Safety: No concerns.
///
+8 -8
View File
@@ -56,7 +56,7 @@ use scale_info::TypeInfo;
serde::Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum AssetInstance {
/// Undefined - used if the non-fungible asset class has only one instance.
Undefined,
@@ -264,7 +264,7 @@ impl TryFrom<AssetInstance> for u128 {
serde::Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum Fungibility {
/// A fungible asset; we record a number of units, as a `u128` in the inner item.
Fungible(#[codec(compact)] u128),
@@ -347,7 +347,7 @@ impl TryFrom<NewFungibility> for Fungibility {
serde::Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum WildFungibility {
/// The asset is fungible.
Fungible,
@@ -384,7 +384,7 @@ impl TryFrom<NewWildFungibility> for WildFungibility {
serde::Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum AssetId {
/// A specific location identifying an asset.
Concrete(MultiLocation),
@@ -462,7 +462,7 @@ impl AssetId {
serde::Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub struct MultiAsset {
/// The overall asset identity (aka *class*, in the case of a non-fungible).
pub id: AssetId,
@@ -573,7 +573,7 @@ impl TryFrom<NewMultiAsset> for MultiAsset {
serde::Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub struct MultiAssets(Vec<MultiAsset>);
/// Maximum number of items in a single `MultiAssets` value that can be decoded.
@@ -793,7 +793,7 @@ impl MultiAssets {
serde::Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum WildMultiAsset {
/// All assets in Holding.
All,
@@ -910,7 +910,7 @@ impl<A: Into<AssetId>, B: Into<WildFungibility>> From<(A, B)> for WildMultiAsset
serde::Deserialize,
)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum MultiAssetFilter {
/// Specify the filter as being everything contained by the given `MultiAssets` inner.
Definite(MultiAssets),
+7 -7
View File
@@ -33,7 +33,7 @@ use scale_info::TypeInfo;
/// - 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
/// Substrate chain.
/// Bizinikiwi chain.
/// - An account.
///
/// A `MultiLocation` is a *relative identifier*, meaning that it can only be used to define the
@@ -267,7 +267,7 @@ impl MultiLocation {
///
/// # Example
/// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation};
/// # use pezstaging_xcm::v3::{Junctions::*, Junction::*, MultiLocation};
/// let mut m = MultiLocation::new(1, X2(PalletInstance(3), OnlyChild));
/// assert_eq!(
/// m.match_and_split(&MultiLocation::new(1, X1(PalletInstance(3)))),
@@ -292,7 +292,7 @@ impl MultiLocation {
///
/// # Example
/// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent};
/// # use pezstaging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent};
/// let mut m: MultiLocation = (Parent, Teyrchain(21), 69u64).into();
/// assert_eq!(m.append_with((Parent, PalletInstance(3))), Ok(()));
/// assert_eq!(m, MultiLocation::new(1, X2(Teyrchain(21), PalletInstance(3))));
@@ -311,7 +311,7 @@ impl MultiLocation {
///
/// # Example
/// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent};
/// # use pezstaging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent};
/// let mut m: MultiLocation = (Parent, Teyrchain(21), 69u64).into();
/// let r = m.appended_with((Parent, PalletInstance(3))).unwrap();
/// assert_eq!(r, MultiLocation::new(1, X2(Teyrchain(21), PalletInstance(3))));
@@ -329,7 +329,7 @@ impl MultiLocation {
///
/// # Example
/// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent};
/// # use pezstaging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent};
/// let mut m: MultiLocation = (Parent, Parent, PalletInstance(3)).into();
/// assert_eq!(m.prepend_with((Parent, Teyrchain(21), OnlyChild)), Ok(()));
/// assert_eq!(m, MultiLocation::new(1, X1(PalletInstance(3))));
@@ -376,7 +376,7 @@ impl MultiLocation {
///
/// # Example
/// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent};
/// # use pezstaging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent};
/// let m: MultiLocation = (Parent, Parent, PalletInstance(3)).into();
/// let r = m.prepended_with((Parent, Teyrchain(21), OnlyChild)).unwrap();
/// assert_eq!(r, MultiLocation::new(1, X1(PalletInstance(3))));
@@ -397,7 +397,7 @@ impl MultiLocation {
target: &MultiLocation,
context: InteriorMultiLocation,
) -> Result<(), ()> {
// TODO: https://github.com/paritytech/polkadot/issues/4489 Optimize this.
// TODO: https://github.com/pezkuwichain/kurdistan-sdk/issues/149 Optimize this.
// 1. Use our `context` to figure out how the `target` would address us.
let inverted_target = context.invert_target(target)?;
+8 -8
View File
@@ -20,11 +20,11 @@ use crate::v5::Error as NewError;
use core::result;
use scale_info::TypeInfo;
pub use sp_weights::Weight;
pub use pezsp_weights::Weight;
// A simple trait to get the weight of some object.
pub trait GetWeight<W> {
fn weight(&self) -> sp_weights::Weight;
fn weight(&self) -> pezsp_weights::Weight;
}
use super::*;
@@ -44,7 +44,7 @@ use super::*;
TypeInfo,
MaxEncodedLen,
)]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
pub enum Error {
// Errors that happen due to instructions being executed. These alone are defined in the
@@ -238,7 +238,7 @@ pub type Result = result::Result<(), Error>;
/// Outcome of an XCM execution.
#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo)]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum Outcome {
/// Execution completed successfully; given weight was used.
Complete(Weight),
@@ -384,7 +384,7 @@ impl<C> ExecuteXcm<C> for () {
#[derive(
Clone, Encode, Decode, DecodeWithMemTracking, Eq, PartialEq, Debug, scale_info::TypeInfo,
)]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
pub enum SendError {
/// The message and destination combination was not recognized as being reachable.
///
@@ -424,8 +424,8 @@ pub type SendResult<T> = result::Result<(T, MultiAssets), SendError>;
/// # Example
/// ```rust
/// # use codec::Encode;
/// # use staging_xcm::v3::{prelude::*, Weight};
/// # use staging_xcm::VersionedXcm;
/// # use pezstaging_xcm::v3::{prelude::*, Weight};
/// # use pezstaging_xcm::VersionedXcm;
/// # use std::convert::Infallible;
///
/// /// A sender that only passes the message through and does nothing.
@@ -478,7 +478,7 @@ pub type SendResult<T> = result::Result<(T, MultiAssets), SendError>;
/// require_weight_at_most: Weight::zero(),
/// call: call.into(),
/// }]);
/// let message_hash = message.using_encoded(sp_io::hashing::blake2_256);
/// let message_hash = message.using_encoded(pezsp_io::hashing::blake2_256);
///
/// // Sender2 will block this.
/// assert!(send_xcm::<(Sender1, Sender2, Sender3)>(Parent.into(), message.clone()).is_err());
+1 -1
View File
@@ -55,7 +55,7 @@ pub enum Junction {
/// A 32-byte identifier for an account of a specific network that is respected as a sovereign
/// endpoint within the context.
///
/// Generally used when the context is a Substrate-based chain.
/// Generally used when the context is a Bizinikiwi-based chain.
AccountId32 { network: Option<NetworkId>, id: [u8; 32] },
/// An 8-byte index for an account of a specific network that is respected as a sovereign
/// endpoint within the context.
+2 -2
View File
@@ -498,7 +498,7 @@ impl Junctions {
///
/// # Example
/// ```rust
/// # use staging_xcm::v4::{Junctions, Junction::*, Location};
/// # use pezstaging_xcm::v4::{Junctions, Junction::*, Location};
/// # fn main() {
/// let mut m = Junctions::from([Teyrchain(21)]);
/// assert_eq!(m.append_with([PalletInstance(3)]), Ok(()));
@@ -543,7 +543,7 @@ impl Junctions {
///
/// # Example
/// ```rust
/// # use staging_xcm::v4::{Junctions, Junction::*};
/// # use pezstaging_xcm::v4::{Junctions, Junction::*};
/// # fn main() {
/// let mut m = Junctions::from([Teyrchain(2), PalletInstance(3), OnlyChild]);
/// assert_eq!(m.match_and_split(&[Teyrchain(2), PalletInstance(3)].into()), Some(&OnlyChild));
+10 -10
View File
@@ -33,7 +33,7 @@ use scale_info::TypeInfo;
/// - 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
/// Substrate chain.
/// Bizinikiwi chain.
/// - An account.
///
/// A `Location` is a *relative identifier*, meaning that it can only be used to define the
@@ -139,7 +139,7 @@ impl Location {
/// To be used when pattern matching, for example:
///
/// ```rust
/// # use staging_xcm::v4::{Junctions::*, Junction::*, Location};
/// # use pezstaging_xcm::v4::{Junctions::*, Junction::*, Location};
/// fn get_teyrchain_id(loc: &Location) -> Option<u32> {
/// match loc.unpack() {
/// (0, [Teyrchain(id)]) => Some(*id),
@@ -274,7 +274,7 @@ impl Location {
///
/// # Example
/// ```rust
/// # use staging_xcm::v4::{Junctions::*, Junction::*, Location};
/// # use pezstaging_xcm::v4::{Junctions::*, Junction::*, Location};
/// # fn main() {
/// let mut m = Location::new(1, [PalletInstance(3), OnlyChild]);
/// assert_eq!(
@@ -301,7 +301,7 @@ impl Location {
///
/// # Example
/// ```rust
/// # use staging_xcm::v4::{Junctions::*, Junction::*, Location, Parent};
/// # use pezstaging_xcm::v4::{Junctions::*, Junction::*, Location, Parent};
/// # fn main() {
/// let mut m: Location = (Parent, Teyrchain(21), 69u64).into();
/// assert_eq!(m.append_with((Parent, PalletInstance(3))), Ok(()));
@@ -322,7 +322,7 @@ impl Location {
///
/// # Example
/// ```rust
/// # use staging_xcm::v4::{Junctions::*, Junction::*, Location, Parent};
/// # use pezstaging_xcm::v4::{Junctions::*, Junction::*, Location, Parent};
/// # fn main() {
/// let mut m: Location = (Parent, Teyrchain(21), 69u64).into();
/// let r = m.appended_with((Parent, PalletInstance(3))).unwrap();
@@ -342,7 +342,7 @@ impl Location {
///
/// # Example
/// ```rust
/// # use staging_xcm::v4::{Junctions::*, Junction::*, Location, Parent};
/// # use pezstaging_xcm::v4::{Junctions::*, Junction::*, Location, Parent};
/// # fn main() {
/// let mut m: Location = (Parent, Parent, PalletInstance(3)).into();
/// assert_eq!(m.prepend_with((Parent, Teyrchain(21), OnlyChild)), Ok(()));
@@ -391,7 +391,7 @@ impl Location {
///
/// # Example
/// ```rust
/// # use staging_xcm::v4::{Junctions::*, Junction::*, Location, Parent};
/// # use pezstaging_xcm::v4::{Junctions::*, Junction::*, Location, Parent};
/// # fn main() {
/// let m: Location = (Parent, Parent, PalletInstance(3)).into();
/// let r = m.prepended_with((Parent, Teyrchain(21), OnlyChild)).unwrap();
@@ -448,7 +448,7 @@ impl Reanchorable for Location {
///
/// Does not modify `self` in case of overflow.
fn reanchor(&mut self, target: &Location, context: &InteriorLocation) -> Result<(), ()> {
// TODO: https://github.com/paritytech/polkadot/issues/4489 Optimize this.
// TODO: https://github.com/pezkuwichain/kurdistan-sdk/issues/149 Optimize this.
// 1. Use our `context` to figure out how the `target` would address us.
let inverted_target = context.invert_target(target)?;
@@ -549,8 +549,8 @@ impl From<[u8; 32]> for Location {
}
}
impl From<sp_runtime::AccountId32> for Location {
fn from(id: sp_runtime::AccountId32) -> Self {
impl From<pezsp_runtime::AccountId32> for Location {
fn from(id: pezsp_runtime::AccountId32) -> Self {
Junction::AccountId32 { network: None, id: id.into() }.into()
}
}
+6 -6
View File
@@ -36,7 +36,7 @@ use codec::{
};
use core::{fmt::Debug, result};
use derive_where::derive_where;
use frame_support::dispatch::GetDispatchInfo;
use pezframe_support::dispatch::GetDispatchInfo;
use scale_info::TypeInfo;
mod asset;
@@ -316,8 +316,8 @@ impl TryFrom<OldResponse> for Response {
ExecutionResult(result) =>
Self::ExecutionResult(result.map(|(num, old_error)| (num, old_error.into()))),
Version(version) => Self::Version(version),
PalletsInfo(pallet_info) => {
let inner = pallet_info
PalletsInfo(pezpallet_info) => {
let inner = pezpallet_info
.into_iter()
.map(TryInto::try_into)
.collect::<result::Result<Vec<_>, _>>()?;
@@ -345,8 +345,8 @@ impl TryFrom<NewResponse> for Response {
.transpose()?,
),
Version(version) => Self::Version(version),
PalletsInfo(pallet_info) => {
let inner = pallet_info
PalletsInfo(pezpallet_info) => {
let inner = pezpallet_info
.into_iter()
.map(TryInto::try_into)
.collect::<result::Result<Vec<_>, _>>()?;
@@ -888,7 +888,7 @@ pub enum Instruction<Call> {
///
/// Sends a `QueryResponse` to Origin whose data field `PalletsInfo` containing the information
/// of all pallets on the local chain whose name is equal to `name`. This is empty in the case
/// that the local chain is not based on Substrate Frame.
/// that the local chain is not based on Bizinikiwi Frame.
///
/// Safety: No concerns.
///
+4 -4
View File
@@ -21,7 +21,7 @@ use codec::{Decode, Encode};
use core::result;
use scale_info::TypeInfo;
pub use sp_weights::Weight;
pub use pezsp_weights::Weight;
use super::*;
@@ -162,8 +162,8 @@ pub type SendResult<T> = result::Result<(T, Assets), SendError>;
/// # Example
/// ```rust
/// # use codec::Encode;
/// # use staging_xcm::v4::{prelude::*, Weight};
/// # use staging_xcm::VersionedXcm;
/// # use pezstaging_xcm::v4::{prelude::*, Weight};
/// # use pezstaging_xcm::VersionedXcm;
/// # use std::convert::Infallible;
///
/// /// A sender that only passes the message through and does nothing.
@@ -216,7 +216,7 @@ pub type SendResult<T> = result::Result<(T, Assets), SendError>;
/// require_weight_at_most: Weight::zero(),
/// call: call.into(),
/// }]);
/// let message_hash = message.using_encoded(sp_io::hashing::blake2_256);
/// let message_hash = message.using_encoded(pezsp_io::hashing::blake2_256);
///
/// // Sender2 will block this.
/// assert!(send_xcm::<(Sender1, Sender2, Sender3)>(Parent.into(), message.clone()).is_err());
+1 -1
View File
@@ -55,7 +55,7 @@ pub enum Junction {
/// A 32-byte identifier for an account of a specific network that is respected as a sovereign
/// endpoint within the context.
///
/// Generally used when the context is a Substrate-based chain.
/// Generally used when the context is a Bizinikiwi-based chain.
AccountId32 { network: Option<NetworkId>, id: [u8; 32] },
/// An 8-byte index for an account of a specific network that is respected as a sovereign
/// endpoint within the context.
+2 -2
View File
@@ -498,7 +498,7 @@ impl Junctions {
///
/// # Example
/// ```rust
/// # use staging_xcm::v5::{Junctions, Junction::*, Location};
/// # use pezstaging_xcm::v5::{Junctions, Junction::*, Location};
/// # fn main() {
/// let mut m = Junctions::from([Teyrchain(21)]);
/// assert_eq!(m.append_with([PalletInstance(3)]), Ok(()));
@@ -543,7 +543,7 @@ impl Junctions {
///
/// # Example
/// ```rust
/// # use staging_xcm::v5::{Junctions, Junction::*};
/// # use pezstaging_xcm::v5::{Junctions, Junction::*};
/// # fn main() {
/// let mut m = Junctions::from([Teyrchain(2), PalletInstance(3), OnlyChild]);
/// assert_eq!(m.match_and_split(&[Teyrchain(2), PalletInstance(3)].into()), Some(&OnlyChild));
+10 -10
View File
@@ -33,7 +33,7 @@ use scale_info::TypeInfo;
/// - 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
/// Substrate chain.
/// Bizinikiwi chain.
/// - An account.
///
/// A `Location` is a *relative identifier*, meaning that it can only be used to define the
@@ -139,7 +139,7 @@ impl Location {
/// To be used when pattern matching, for example:
///
/// ```rust
/// # use staging_xcm::v5::{Junctions::*, Junction::*, Location};
/// # use pezstaging_xcm::v5::{Junctions::*, Junction::*, Location};
/// fn get_teyrchain_id(loc: &Location) -> Option<u32> {
/// match loc.unpack() {
/// (0, [Teyrchain(id)]) => Some(*id),
@@ -274,7 +274,7 @@ impl Location {
///
/// # Example
/// ```rust
/// # use staging_xcm::v5::{Junctions::*, Junction::*, Location};
/// # use pezstaging_xcm::v5::{Junctions::*, Junction::*, Location};
/// # fn main() {
/// let mut m = Location::new(1, [PalletInstance(3), OnlyChild]);
/// assert_eq!(
@@ -301,7 +301,7 @@ impl Location {
///
/// # Example
/// ```rust
/// # use staging_xcm::v5::{Junctions::*, Junction::*, Location, Parent};
/// # use pezstaging_xcm::v5::{Junctions::*, Junction::*, Location, Parent};
/// # fn main() {
/// let mut m: Location = (Parent, Teyrchain(21), 69u64).into();
/// assert_eq!(m.append_with((Parent, PalletInstance(3))), Ok(()));
@@ -322,7 +322,7 @@ impl Location {
///
/// # Example
/// ```rust
/// # use staging_xcm::v5::{Junctions::*, Junction::*, Location, Parent};
/// # use pezstaging_xcm::v5::{Junctions::*, Junction::*, Location, Parent};
/// # fn main() {
/// let mut m: Location = (Parent, Teyrchain(21), 69u64).into();
/// let r = m.appended_with((Parent, PalletInstance(3))).unwrap();
@@ -342,7 +342,7 @@ impl Location {
///
/// # Example
/// ```rust
/// # use staging_xcm::v5::{Junctions::*, Junction::*, Location, Parent};
/// # use pezstaging_xcm::v5::{Junctions::*, Junction::*, Location, Parent};
/// # fn main() {
/// let mut m: Location = (Parent, Parent, PalletInstance(3)).into();
/// assert_eq!(m.prepend_with((Parent, Teyrchain(21), OnlyChild)), Ok(()));
@@ -391,7 +391,7 @@ impl Location {
///
/// # Example
/// ```rust
/// # use staging_xcm::v5::{Junctions::*, Junction::*, Location, Parent};
/// # use pezstaging_xcm::v5::{Junctions::*, Junction::*, Location, Parent};
/// # fn main() {
/// let m: Location = (Parent, Parent, PalletInstance(3)).into();
/// let r = m.prepended_with((Parent, Teyrchain(21), OnlyChild)).unwrap();
@@ -448,7 +448,7 @@ impl Reanchorable for Location {
///
/// Does not modify `self` in case of overflow.
fn reanchor(&mut self, target: &Location, context: &InteriorLocation) -> Result<(), ()> {
// TODO: https://github.com/paritytech/polkadot/issues/4489 Optimize this.
// TODO: https://github.com/pezkuwichain/kurdistan-sdk/issues/149 Optimize this.
// 1. Use our `context` to figure out how the `target` would address us.
let inverted_target = context.invert_target(target)?;
@@ -535,8 +535,8 @@ impl From<[u8; 32]> for Location {
}
}
impl From<sp_runtime::AccountId32> for Location {
fn from(id: sp_runtime::AccountId32) -> Self {
impl From<pezsp_runtime::AccountId32> for Location {
fn from(id: pezsp_runtime::AccountId32) -> Self {
Junction::AccountId32 { network: None, id: id.into() }.into()
}
}
+3 -3
View File
@@ -301,8 +301,8 @@ impl TryFrom<OldResponse> for Response {
.transpose()?,
),
Version(version) => Self::Version(version),
PalletsInfo(pallet_info) => {
let inner = pallet_info
PalletsInfo(pezpallet_info) => {
let inner = pezpallet_info
.into_iter()
.map(TryInto::try_into)
.collect::<result::Result<Vec<_>, _>>()?;
@@ -846,7 +846,7 @@ pub enum Instruction<Call> {
///
/// Sends a `QueryResponse` to Origin whose data field `PalletsInfo` containing the information
/// of all pallets on the local chain whose name is equal to `name`. This is empty in the case
/// that the local chain is not based on Substrate Frame.
/// that the local chain is not based on Bizinikiwi Frame.
///
/// Safety: No concerns.
///
+5 -5
View File
@@ -21,7 +21,7 @@ use codec::{Decode, DecodeWithMemTracking, Encode};
use core::result;
use scale_info::TypeInfo;
pub use sp_weights::Weight;
pub use pezsp_weights::Weight;
use super::*;
@@ -40,7 +40,7 @@ use super::*;
TypeInfo,
MaxEncodedLen,
)]
#[scale_info(replace_segment("staging_xcm", "xcm"))]
#[scale_info(replace_segment("pezstaging_xcm", "xcm"))]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
pub enum Error {
// Errors that happen due to instructions being executed. These alone are defined in the
@@ -392,8 +392,8 @@ pub type SendResult<T> = result::Result<(T, Assets), SendError>;
/// # Example
/// ```rust
/// # use codec::Encode;
/// # use staging_xcm::v5::{prelude::*, Weight};
/// # use staging_xcm::VersionedXcm;
/// # use pezstaging_xcm::v5::{prelude::*, Weight};
/// # use pezstaging_xcm::VersionedXcm;
/// # use std::convert::Infallible;
///
/// /// A sender that only passes the message through and does nothing.
@@ -446,7 +446,7 @@ pub type SendResult<T> = result::Result<(T, Assets), SendError>;
/// call: call.into(),
/// fallback_max_weight: None,
/// }]);
/// let message_hash = message.using_encoded(sp_io::hashing::blake2_256);
/// let message_hash = message.using_encoded(pezsp_io::hashing::blake2_256);
///
/// // Sender2 will block this.
/// assert!(send_xcm::<(Sender1, Sender2, Sender3)>(Parent.into(), message.clone()).is_err());