referrerpolicy=no-referrer-when-downgrade
bp_messages::source_chain

Trait DeliveryConfirmationPayments

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

    // Required method
    fn pay_reward(
        lane_id: LaneId,
        messages_relayers: VecDeque<UnrewardedRelayer<AccountId>>,
        confirmation_relayer: &AccountId,
        received_range: &RangeInclusive<MessageNonce>,
    ) -> MessageNonce;
}
Expand description

Manages payments that are happening at the source chain during delivery confirmation transaction.

Required Associated Types§

Source

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

Error type.

Required Methods§

Source

fn pay_reward( lane_id: LaneId, messages_relayers: VecDeque<UnrewardedRelayer<AccountId>>, confirmation_relayer: &AccountId, received_range: &RangeInclusive<MessageNonce>, ) -> MessageNonce

Pay rewards for delivering messages to the given relayers.

The implementation may also choose to pay reward to the confirmation_relayer, which is a relayer that has submitted delivery confirmation transaction.

Returns number of actually rewarded relayers.

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, LaneId> DeliveryConfirmationPayments<AccountId, LaneId> for ()

Source§

type Error = &'static str

Source§

fn pay_reward( _lane_id: LaneId, _messages_relayers: VecDeque<UnrewardedRelayer<AccountId>>, _confirmation_relayer: &AccountId, _received_range: &RangeInclusive<MessageNonce>, ) -> MessageNonce

Implementors§

Source§

impl<AccountId, LaneId> DeliveryConfirmationPayments<AccountId, LaneId> for ForbidOutboundMessages

Source§

type Error = &'static str

impl<T, MI, RI, DeliveryReward> DeliveryConfirmationPayments<<T as Config>::AccountId, <T as Config<MI>>::LaneId> for DeliveryConfirmationPaymentsAdapter<T, MI, RI, DeliveryReward>
where T: Config<RI> + Config<MI>, MI: 'static, RI: 'static, DeliveryReward: Get<T::RewardBalance>, <T as Config<RI>>::Reward: From<RewardsAccountParams<LaneIdOf<T, MI>>>,