Function xcm_weigh

Source
pub fn xcm_weigh<Call>(msg: &VersionedXcm<Call>) -> Result<Weight>
where Call: Encode,
Expand description

Estimates the [Weight] required to execute a given XCM message.

This is done by invoking the XCM precompile. For more details consult the precompile interface.

§Errors

  • If the message cannot be properly decoded in the XCM precompile.
  • If the XCM execution fails because of the runtime’s XCM configuration.

§Panics

Panics in the off-chain environment.