referrerpolicy=no-referrer-when-downgrade

Trait snowbridge_core::outbound::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

Object Safety§

This trait is not object safe.

Implementors§