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§
Required Methods§
sourcefn pay_reward(
lane_id: LaneId,
messages_relayers: VecDeque<UnrewardedRelayer<AccountId>>,
confirmation_relayer: &AccountId,
received_range: &RangeInclusive<MessageNonce>,
) -> MessageNonce
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.
Object Safety§
This trait is not object safe.