referrerpolicy=no-referrer-when-downgrade

Trait staging_xcm_builder::test_utils::ExecuteXcm

pub trait ExecuteXcm<Call> {
    type Prepared: PreparedMessage;

    // Required methods
    fn prepare(message: Xcm<Call>) -> Result<Self::Prepared, Xcm<Call>>;
    fn execute(
        origin: impl Into<Location>,
        pre: Self::Prepared,
        id: &mut [u8; 32],
        weight_credit: Weight,
    ) -> Outcome;
    fn charge_fees(
        location: impl Into<Location>,
        fees: Assets,
    ) -> Result<(), Error>;

    // Provided method
    fn prepare_and_execute(
        origin: impl Into<Location>,
        message: Xcm<Call>,
        id: &mut [u8; 32],
        weight_limit: Weight,
        weight_credit: Weight,
    ) -> Outcome { ... }
}
Expand description

Type of XCM message executor.

Required Associated Types§

Required Methods§

fn prepare(message: Xcm<Call>) -> Result<Self::Prepared, Xcm<Call>>

fn execute( origin: impl Into<Location>, pre: Self::Prepared, id: &mut [u8; 32], weight_credit: Weight, ) -> Outcome

fn charge_fees(location: impl Into<Location>, fees: Assets) -> Result<(), Error>

Deduct some fees to the sovereign account of the given location and place them as per the convention for fees.

Provided Methods§

fn prepare_and_execute( origin: impl Into<Location>, message: Xcm<Call>, id: &mut [u8; 32], weight_limit: Weight, weight_credit: Weight, ) -> Outcome

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<C> ExecuteXcm<C> for ()

§

type Prepared = Weightless

§

fn prepare(message: Xcm<C>) -> Result<<() as ExecuteXcm<C>>::Prepared, Xcm<C>>

§

fn execute( _: impl Into<Location>, _: <() as ExecuteXcm<C>>::Prepared, _: &mut [u8; 32], _: Weight, ) -> Outcome

§

fn charge_fees( _location: impl Into<Location>, _fees: Assets, ) -> Result<(), Error>

§

impl<Config> ExecuteXcm<<Config as Config>::RuntimeCall> for XcmExecutor<Config>
where Config: Config,

§

type Prepared = WeighedMessage<<Config as Config>::RuntimeCall>

§

fn prepare( message: Xcm<<Config as Config>::RuntimeCall>, ) -> Result<<XcmExecutor<Config> as ExecuteXcm<<Config as Config>::RuntimeCall>>::Prepared, Xcm<<Config as Config>::RuntimeCall>>

§

fn execute( origin: impl Into<Location>, _: WeighedMessage<<Config as Config>::RuntimeCall>, id: &mut [u8; 32], weight_credit: Weight, ) -> Outcome

§

fn charge_fees(origin: impl Into<Location>, fees: Assets) -> Result<(), Error>

Implementors§