referrerpolicy=no-referrer-when-downgrade
emulated_integration_tests_common::macros

Trait DryRunApiV2

Source
pub trait DryRunApiV2<Block, Call, Event, OriginCaller>
where Block: Block, Call: Encode, Event: Decode, OriginCaller: Encode,
{ // Required methods fn dry_run_call( origin: OriginCaller, call: Call, result_xcms_version: u32, ) -> Result<CallDryRunEffects<Event>, Error>; fn dry_run_xcm( origin_location: VersionedLocation, xcm: VersionedXcm<Call>, ) -> Result<XcmDryRunEffects<Event>, Error>; }
Expand description

API for dry-running extrinsics and XCM programs to get the programs that need to be passed to the fees API.

All calls return a vector of tuples (location, xcm) where each “xcm” is executed in “location”. If there’s local execution, the location will be “Here”. This vector can be used to calculate both execution and delivery fees.

Calls or XCMs might fail when executed, this doesn’t mean the result of these calls will be an Err. In those cases, there might still be a valid result, with the execution error inside it. The only reasons why these calls might return an error are listed in the Error enum.

Required Methods§

Source

fn dry_run_call( origin: OriginCaller, call: Call, result_xcms_version: u32, ) -> Result<CallDryRunEffects<Event>, Error>

Dry run call V2.

Source

fn dry_run_xcm( origin_location: VersionedLocation, xcm: VersionedXcm<Call>, ) -> Result<XcmDryRunEffects<Event>, Error>

Dry run XCM program

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§