Files
pezkuwi-sdk/bridges/snowbridge/primitives/outbound-queue/src/v2/exporter.rs
T
pezkuwichain 379cb741ed 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.
2025-12-14 00:04:10 +03:00

48 lines
1.4 KiB
Rust

// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
use core::marker::PhantomData;
use snowbridge_core::operating_mode::ExportPausedQuery;
use pezsp_std::vec::Vec;
use xcm::{
prelude::{Location, SendError, SendResult, SendXcm, Xcm, XcmHash},
VersionedLocation, VersionedXcm,
};
use xcm_builder::InspectMessageQueues;
pub struct PausableExporter<PausedQuery, InnerExporter>(PhantomData<(PausedQuery, InnerExporter)>);
impl<PausedQuery: ExportPausedQuery, InnerExporter: SendXcm> SendXcm
for PausableExporter<PausedQuery, InnerExporter>
{
type Ticket = InnerExporter::Ticket;
fn validate(
destination: &mut Option<Location>,
message: &mut Option<Xcm<()>>,
) -> SendResult<Self::Ticket> {
match PausedQuery::is_paused() {
true => Err(SendError::NotApplicable),
false => InnerExporter::validate(destination, message),
}
}
fn deliver(ticket: Self::Ticket) -> Result<XcmHash, SendError> {
match PausedQuery::is_paused() {
true => Err(SendError::NotApplicable),
false => InnerExporter::deliver(ticket),
}
}
}
impl<Halted: ExportPausedQuery, InnerExporter: SendXcm> InspectMessageQueues
for PausableExporter<Halted, InnerExporter>
{
fn clear_messages() {}
/// This router needs to implement `InspectMessageQueues` but doesn't have to
/// return any messages, since it just reuses the inner router.
fn get_messages() -> Vec<(VersionedLocation, Vec<VersionedXcm<()>>)> {
Vec::new()
}
}