referrerpolicy=no-referrer-when-downgrade

Trait bp_messages::target_chain::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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<AccountId> DeliveryPayments<AccountId> for ()

§

type Error = &'static str

source§

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

Implementors§