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:
+59
@@ -0,0 +1,59 @@
|
||||
[package]
|
||||
name = "bp-asset-hub-pezkuwichain"
|
||||
description = "Primitives of AssetHubPezkuwichain teyrchain runtime."
|
||||
version = "0.4.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
repository.workspace = true
|
||||
|
||||
[package.metadata.pezkuwi-sdk]
|
||||
exclude-from-umbrella = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
codec = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
|
||||
# Bizinikiwi Dependencies
|
||||
pezframe-support = { workspace = true }
|
||||
pezsp-api = { workspace = true }
|
||||
pezsp-core = { workspace = true }
|
||||
|
||||
# Bridge Dependencies
|
||||
bp-bridge-hub-pezcumulus = { workspace = true }
|
||||
bp-messages = { workspace = true }
|
||||
bp-runtime = { workspace = true }
|
||||
bp-xcm-bridge-hub-router = { workspace = true }
|
||||
testnet-teyrchains-constants = { features = ["pezkuwichain"], workspace = true }
|
||||
|
||||
# Pezkuwi dependencies
|
||||
xcm = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"bp-bridge-hub-pezcumulus/std",
|
||||
"bp-messages/std",
|
||||
"bp-runtime/std",
|
||||
"bp-xcm-bridge-hub-router/std",
|
||||
"codec/std",
|
||||
"pezframe-support/std",
|
||||
"scale-info/std",
|
||||
"pezsp-api/std",
|
||||
"pezsp-core/std",
|
||||
"testnet-teyrchains-constants/std",
|
||||
"xcm/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bp-bridge-hub-pezcumulus/runtime-benchmarks",
|
||||
"bp-messages/runtime-benchmarks",
|
||||
"bp-runtime/runtime-benchmarks",
|
||||
"bp-xcm-bridge-hub-router/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezsp-api/runtime-benchmarks",
|
||||
"testnet-teyrchains-constants/runtime-benchmarks",
|
||||
"xcm/runtime-benchmarks",
|
||||
]
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Module with configuration which reflects AssetHubPezkuwichain runtime setup.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use codec::{Decode, Encode};
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
pub use bp_bridge_hub_cumulus::*;
|
||||
use bp_messages::*;
|
||||
use bp_runtime::{
|
||||
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Teyrchain,
|
||||
};
|
||||
pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
|
||||
use pezframe_support::{
|
||||
dispatch::DispatchClass,
|
||||
pezsp_runtime::{MultiAddress, MultiSigner, RuntimeDebug, StateVersion},
|
||||
};
|
||||
use testnet_teyrchains_constants::pezkuwichain::currency::UNITS;
|
||||
use xcm::latest::prelude::*;
|
||||
|
||||
/// `AssetHubPezkuwichain` Runtime `Call` enum.
|
||||
///
|
||||
/// The enum represents a subset of possible `Call`s we can send to `AssetHubPezkuwichain` chain.
|
||||
/// Ideally this code would be auto-generated from metadata, because we want to
|
||||
/// avoid depending directly on the ENTIRE runtime just to get the encoding of `Dispatchable`s.
|
||||
///
|
||||
/// All entries here (like pretty much in the entire file) must be kept in sync with
|
||||
/// `AssetHubPezkuwichain` `construct_runtime`, so that we maintain SCALE-compatibility.
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
|
||||
pub enum Call {
|
||||
/// `ToZagrosXcmRouter` bridge pallet.
|
||||
#[codec(index = 45)]
|
||||
ToZagrosXcmRouter(XcmBridgeHubRouterCall),
|
||||
}
|
||||
|
||||
pezframe_support::parameter_types! {
|
||||
/// Some sane weight to execute `xcm::Transact(pezpallet-xcm-bridge-hub-router::Call::report_bridge_status)`.
|
||||
pub const XcmBridgeHubRouterTransactCallMaxWeight: pezframe_support::weights::Weight = pezframe_support::weights::Weight::from_parts(200_000_000, 6144);
|
||||
/// Should match the `AssetDeposit` of the `ForeignAssets` pallet on Asset Hub.
|
||||
pub const CreateForeignAssetDeposit: u128 = UNITS / 10;
|
||||
}
|
||||
|
||||
/// Builds an (un)congestion XCM program with the `report_bridge_status` call for
|
||||
/// `ToZagrosXcmRouter`.
|
||||
pub fn build_congestion_message<RuntimeCall>(
|
||||
bridge_id: pezsp_core::H256,
|
||||
is_congested: bool,
|
||||
) -> alloc::vec::Vec<Instruction<RuntimeCall>> {
|
||||
alloc::vec![
|
||||
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
|
||||
Transact {
|
||||
origin_kind: OriginKind::Xcm,
|
||||
fallback_max_weight: Some(XcmBridgeHubRouterTransactCallMaxWeight::get()),
|
||||
call: Call::ToZagrosXcmRouter(XcmBridgeHubRouterCall::report_bridge_status {
|
||||
bridge_id,
|
||||
is_congested,
|
||||
})
|
||||
.encode()
|
||||
.into(),
|
||||
},
|
||||
ExpectTransactStatus(MaybeErrorCode::Success),
|
||||
]
|
||||
}
|
||||
|
||||
/// Identifier of AssetHubPezkuwichain in the Pezkuwichain relay chain.
|
||||
pub const ASSET_HUB_PEZKUWICHAIN_TEYRCHAIN_ID: u32 = 1000;
|
||||
|
||||
/// AssetHubPezkuwichain teyrchain.
|
||||
#[derive(RuntimeDebug)]
|
||||
|
||||
pub struct AssetHubPezkuwichain;
|
||||
|
||||
impl Chain for AssetHubPezkuwichain {
|
||||
const ID: ChainId = *b"ahro";
|
||||
|
||||
type BlockNumber = BlockNumber;
|
||||
type Hash = Hash;
|
||||
type Hasher = Hasher;
|
||||
type Header = Header;
|
||||
|
||||
type AccountId = AccountId;
|
||||
type Balance = Balance;
|
||||
type Nonce = Nonce;
|
||||
type Signature = Signature;
|
||||
|
||||
const STATE_VERSION: StateVersion = StateVersion::V1;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
*BlockLength::get().max.get(DispatchClass::Normal)
|
||||
}
|
||||
|
||||
fn max_extrinsic_weight() -> Weight {
|
||||
BlockWeightsForAsyncBacking::get()
|
||||
.get(DispatchClass::Normal)
|
||||
.max_extrinsic
|
||||
.unwrap_or(Weight::MAX)
|
||||
}
|
||||
}
|
||||
|
||||
impl Teyrchain for AssetHubPezkuwichain {
|
||||
const TEYRCHAIN_ID: u32 = ASSET_HUB_PEZKUWICHAIN_TEYRCHAIN_ID;
|
||||
const MAX_HEADER_SIZE: u32 = MAX_ASSET_HUB_HEADER_SIZE;
|
||||
}
|
||||
|
||||
/// Describing permissionless lanes instance
|
||||
impl ChainWithMessages for AssetHubPezkuwichain {
|
||||
const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str =
|
||||
WITH_ASSET_HUB_PEZKUWICHAIN_MESSAGES_PALLET_NAME;
|
||||
|
||||
const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce =
|
||||
MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX;
|
||||
const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce =
|
||||
MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX;
|
||||
}
|
||||
|
||||
/// Public key of the chain account that may be used to verify signatures.
|
||||
pub type AccountSigner = MultiSigner;
|
||||
|
||||
/// The address format for describing accounts.
|
||||
pub type Address = MultiAddress<AccountId, ()>;
|
||||
|
||||
/// Name of the With-AssetHubPezkuwichain messages pallet instance that is deployed at bridged
|
||||
/// chains.
|
||||
pub const WITH_ASSET_HUB_PEZKUWICHAIN_MESSAGES_PALLET_NAME: &str = "BridgePezkuwichainMessages";
|
||||
|
||||
/// Name of the With-AssetHubPezkuwichain bridge-relayers pallet instance that is deployed at
|
||||
/// bridged chains.
|
||||
pub const WITH_ASSET_HUB_PEZKUWICHAIN_RELAYERS_PALLET_NAME: &str = "BridgeRelayers";
|
||||
|
||||
/// Pallet index of `BridgeZagrosMessages: pezpallet_bridge_messages::<Instance1>`.
|
||||
pub const WITH_BRIDGE_PEZKUWICHAIN_TO_ZAGROS_MESSAGES_PALLET_INDEX: u8 = 62;
|
||||
|
||||
decl_bridge_finality_runtime_apis!(asset_hub_pezkuwichain);
|
||||
decl_bridge_messages_runtime_apis!(asset_hub_pezkuwichain, HashedLaneId);
|
||||
Reference in New Issue
Block a user