Files
pezkuwi-sdk/pezbridges/pezsnowbridge/primitives/outbound-queue/src/lib.rs
T
pezkuwichain 6b597bebcf fix: EnsureOrigin try_successful_origin and snowbridge rename
- Fix pezpallet-welati EnsureOrigin implementations (3 fixes)
  - Remove incorrect #[cfg(not(feature = "runtime-benchmarks"))] blocks
  - Affects EnsureSerok, EnsureParlementer, EnsureDiwan

- Fix asset-hub-zagros governance origins macros (2 fixes)
  - Remove non-benchmark try_successful_origin from decl_unit_ensures!
  - Remove non-benchmark try_successful_origin from decl_ensure!

- Rename snowbridge -> pezsnowbridge for consistency

- Update WORKFLOW_PLAN.md with build status and package names
  - Correct package names: pezkuwi-teyrchain-bin, pezstaging-node-cli
  - Mark completed builds: pezkuwi, pezkuwi-teyrchain-bin,
    pezstaging-node-cli, teyrchain-template-node
2025-12-25 01:26:18 +03:00

62 lines
1.7 KiB
Rust

// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
#![cfg_attr(not(feature = "std"), no_std)]
//! # Outbound
//!
//! Common traits and types
pub mod v1;
pub mod v2;
use codec::{Decode, DecodeWithMemTracking, Encode};
use pezframe_support::PalletError;
use pezsp_arithmetic::traits::{BaseArithmetic, Unsigned};
use pezsp_core::RuntimeDebug;
use scale_info::TypeInfo;
pub use pezsnowbridge_verification_primitives::*;
/// The operating mode of Channels and Gateway contract on Ethereum.
#[derive(
Copy, Clone, Encode, Decode, DecodeWithMemTracking, PartialEq, Eq, RuntimeDebug, TypeInfo,
)]
pub enum OperatingMode {
/// Normal operations. Allow sending and receiving messages.
Normal,
/// Reject outbound messages. This allows receiving governance messages but does now allow
/// enqueuing of new messages from the Ethereum side. This can be used to close off a
/// deprecated channel or pause the bridge for upgrade operations.
RejectingOutboundMessages,
}
/// A trait for getting the local costs associated with sending a message.
pub trait SendMessageFeeProvider {
type Balance: BaseArithmetic + Unsigned + Copy;
/// The local component of the message processing fees in native currency
fn local_fee() -> Self::Balance;
}
/// Reasons why sending to Ethereum could not be initiated
#[derive(
Copy,
Clone,
Encode,
Decode,
DecodeWithMemTracking,
PartialEq,
Eq,
RuntimeDebug,
PalletError,
TypeInfo,
)]
pub enum SendError {
/// Message is too large to be safely executed on Ethereum
MessageTooLarge,
/// The bridge has been halted for maintenance
Halted,
/// Invalid Channel
InvalidChannel,
/// Invalid Origin
InvalidOrigin,
}