referrerpolicy=no-referrer-when-downgrade

Trait DeliveryPayments

Source
pub trait DeliveryPayments<AccountId> {
    type Error: Debug + Into<&'static str>;

    // Required method
    fn pay_reward(
        relayer: AccountId,
        total_messages: MessageNonce,
        valid_messages: MessageNonce,
        actual_weight: Weight,
    );
}
Expand description

Manages payments that are happening at the target chain during message delivery transaction.

Required Associated Types§

Source

type Error: Debug + Into<&'static str>

Error type.

Required Methods§

Source

fn pay_reward( relayer: AccountId, total_messages: MessageNonce, valid_messages: MessageNonce, actual_weight: Weight, )

Pay rewards for delivering messages to the given relayer.

This method is called during message delivery transaction which has been submitted by the relayer. The transaction brings total_messages messages but only valid_messages have been accepted. The post-dispatch transaction weight is the actual_weight.

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.

Implementations on Foreign Types§

Source§

impl<AccountId> DeliveryPayments<AccountId> for ()

Source§

type Error = &'static str

Source§

fn pay_reward( _relayer: AccountId, _total_messages: MessageNonce, _valid_messages: MessageNonce, _actual_weight: Weight, )

Implementors§