referrerpolicy=no-referrer-when-downgrade
snowbridge_core::outbound

Trait SendMessage

Source
pub trait SendMessage: SendMessageFeeProvider {
    type Ticket: Clone + Encode + Decode;

    // Required methods
    fn validate(
        message: &Message,
    ) -> Result<(Self::Ticket, Fee<<Self as SendMessageFeeProvider>::Balance>), SendError>;
    fn deliver(ticket: Self::Ticket) -> Result<H256, SendError>;
}
Expand description

A trait for sending messages to Ethereum

Required Associated Types§

Source

type Ticket: Clone + Encode + Decode

Required Methods§

Source

fn validate( message: &Message, ) -> Result<(Self::Ticket, Fee<<Self as SendMessageFeeProvider>::Balance>), SendError>

Validate an outbound message and return a tuple:

  1. Ticket for submitting the message
  2. Delivery fee
Source

fn deliver(ticket: Self::Ticket) -> Result<H256, SendError>

Submit the message ticket for eventual delivery to Ethereum

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

impl<T> SendMessage for Pallet<T>
where T: Config,