fix: Complete snowbridge pezpallet rebrand and critical bug fixes

- snowbridge-pezpallet-* → pezsnowbridge-pezpallet-* (201 refs)
- pallet/ directories → pezpallet/ (4 locations)
- Fixed pezpallet.rs self-include recursion bug
- Fixed sc-chain-spec hardcoded crate name in derive macro
- Reverted .pezpallet_by_name() to .pallet_by_name() (subxt API)
- Added BizinikiwiConfig type alias for zombienet tests
- Deleted obsolete session state files

Verified: pezsnowbridge-pezpallet-*, pezpallet-staking,
pezpallet-staking-async, pezframe-benchmarking-cli all pass cargo check
This commit is contained in:
2025-12-16 09:57:23 +03:00
parent eea003e14d
commit 3139ffa25e
3022 changed files with 42157 additions and 23579 deletions
@@ -0,0 +1,38 @@
[package]
name = "bp-xcm-bridge-hub-router"
description = "Primitives of the xcm-bridge-hub fee pezpallet."
version = "0.6.0"
authors.workspace = true
edition.workspace = true
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
repository.workspace = true
documentation = "https://docs.rs/bp-xcm-bridge-hub-router"
homepage = { workspace = true }
[lints]
workspace = true
[dependencies]
codec = { features = ["bit-vec", "derive"], workspace = true }
scale-info = { features = ["bit-vec", "derive"], workspace = true }
# Bizinikiwi Dependencies
pezsp-core = { workspace = true }
pezsp-runtime = { workspace = true }
# Pezkuwi Dependencies
xcm = { workspace = true }
[features]
default = ["std"]
std = [
"codec/std",
"scale-info/std",
"pezsp-core/std",
"pezsp-runtime/std",
"xcm/std",
]
runtime-benchmarks = [
"pezsp-runtime/runtime-benchmarks",
"xcm/runtime-benchmarks",
]
@@ -0,0 +1,67 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Parity Bridges Common.
// Parity Bridges Common is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Bridges Common is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
//! Primitives of the `xcm-bridge-hub-router` pezpallet.
#![cfg_attr(not(feature = "std"), no_std)]
use codec::{Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use pezsp_core::H256;
use pezsp_runtime::{FixedU128, RuntimeDebug};
use xcm::latest::prelude::Location;
/// Minimal delivery fee factor.
pub const MINIMAL_DELIVERY_FEE_FACTOR: FixedU128 = FixedU128::from_u32(1);
/// XCM channel status provider that may report whether it is congested or not.
///
/// By channel we mean the physical channel that is used to deliver messages of one
/// of the bridge queues.
pub trait XcmChannelStatusProvider {
/// Returns true if the channel is currently congested.
fn is_congested(with: &Location) -> bool;
}
impl XcmChannelStatusProvider for () {
fn is_congested(_with: &Location) -> bool {
false
}
}
/// Current status of the bridge.
#[derive(Clone, Decode, Encode, Eq, PartialEq, TypeInfo, MaxEncodedLen, RuntimeDebug)]
pub struct BridgeState {
/// Current delivery fee factor.
pub delivery_fee_factor: FixedU128,
/// Bridge congestion flag.
pub is_congested: bool,
}
impl Default for BridgeState {
fn default() -> BridgeState {
BridgeState { delivery_fee_factor: MINIMAL_DELIVERY_FEE_FACTOR, is_congested: false }
}
}
/// A minimized version of `pezpallet-xcm-bridge-hub-router::Call` that can be used without a runtime.
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum XcmBridgeHubRouterCall {
/// `pezpallet-xcm-bridge-hub-router::Call::report_bridge_status`
#[codec(index = 0)]
report_bridge_status { bridge_id: H256, is_congested: bool },
}