referrerpolicy=no-referrer-when-downgrade

Function staging_xcm::v5::send_xcm

source ·
pub fn send_xcm<T: SendXcm>(
    dest: Location,
    msg: Xcm<()>,
) -> Result<(XcmHash, Assets), SendError>
Expand description

Convenience function for using a SendXcm implementation. Just interprets the dest and wraps both in Some before passing them as as mutable references into T::send_xcm.

Returns either Ok with the price of the delivery, or Err with the reason why the message could not be sent.

Generally you’ll want to validate and get the price first to ensure that the sender can pay it before actually doing the delivery.