referrerpolicy=no-referrer-when-downgrade

Trait bp_relayers::PaymentProcedure

source ·
pub trait PaymentProcedure<Relayer, Reward> {
    type Error: Debug;
    type LaneId: Decode + Encode;

    // Required method
    fn pay_reward(
        relayer: &Relayer,
        rewards_account_params: RewardsAccountParams<Self::LaneId>,
        reward: Reward,
    ) -> Result<(), Self::Error>;
}
Expand description

Reward payment procedure.

Required Associated Types§

source

type Error: Debug

Error that may be returned by the procedure.

source

type LaneId: Decode + Encode

Lane identifier type.

Required Methods§

source

fn pay_reward( relayer: &Relayer, rewards_account_params: RewardsAccountParams<Self::LaneId>, reward: Reward, ) -> Result<(), Self::Error>

Pay reward to the relayer from the account with provided params.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<Relayer, Reward> PaymentProcedure<Relayer, Reward> for ()

§

type Error = &'static str

§

type LaneId = ()

source§

fn pay_reward( _: &Relayer, _: RewardsAccountParams<Self::LaneId>, _: Reward, ) -> Result<(), Self::Error>

Implementors§

source§

impl<T, Relayer, LaneId> PaymentProcedure<Relayer, <T as Inspect<Relayer>>::Balance> for PayRewardFromAccount<T, Relayer, LaneId>
where T: Mutate<Relayer>, Relayer: Decode + Encode + Eq, LaneId: Decode + Encode,

§

type Error = DispatchError

§

type LaneId = LaneId