pub trait ShouldExecute {
    fn should_execute<Call>(
        origin: &MultiLocation,
        message: &mut Xcm<Call>,
        max_weight: Weight,
        weight_credit: &mut Weight
    ) -> Result<(), ()>; }
Expand description

Trait to determine whether the execution engine should actually execute a given XCM.

Can be amalgamated into a tuple to have multiple trials. If any of the tuple elements returns Ok(), the execution stops. Else, Err(_) is returned if all elements reject the message.

Required Methods§

Returns true if the given message may be executed.

  • origin: The origin (sender) of the message.
  • message: The message itself.
  • max_weight: The (possibly over-) estimation of the weight of execution of the message.
  • weight_credit: The pre-established amount of weight that the system has determined this message may utilize in its execution. Typically non-zero only because of prior fee payment, but could in principle be due to other factors.

Implementations on Foreign Types§

Implementors§