referrerpolicy=no-referrer-when-downgrade

Crate xcm_simulator

source ·
Expand description

Test kit to simulate cross-chain message passing and XCM execution.

Re-exports§

Modules§

  • To prevent Out of Memory errors on the DownwardMessageQueue, an exponential fee factor (DeliveryFeeFactor) is set. The fee factor increments exponentially after the number of messages in the DownwardMessageQueue passes a threshold. This threshold is set as:
  • Implementation of a simple message queue. Used for sending messages. Simple mock message queue.

Macros§

  • Implements the TestExt trait for a specified struct.
  • Declares a test network that consists of a relay chain and multiple parachains. Expects a network struct as an argument and implements testing functionality, ParachainXcmRouter and the RelayChainXcmRouter. The struct needs to contain the relay chain struct and an indexed list of parachains that are going to be in the network.
  • The macro is implementing the XcmMessageHandlerT and DmpMessageHandlerT traits for the provided parachain struct. Expects the provided parachain struct to define the XcmpMessageHandler and DmpMessageHandler pallets that contain the message handling logic.
  • The macro is implementing upward message passing(UMP) for the provided relay chain struct. The struct has to provide the XCM configuration for the relay chain.

Structs§

  • A unit struct which can be converted into a Location of the inner parents value.
  • A unit struct which can be converted into a Location of the inner parents value and the inner interior.
  • Either an amount of a single fungible asset, or a single well-identified non-fungible asset.
  • Location to identify an asset.
  • A Vec of Assets.
  • A relative path between state-bearing consensus systems.
  • Unique identifier of a parachain.
  • A unit struct which can be converted into a Location of parents value 1.
  • A tuple struct which can be converted into a Location of parents value 1 with the inner interior.
  • Zero-sized type used to mark things that “act like” they own a T.
  • A message processor that delegates execution to an XcmExecutor.
  • Information regarding the composition of a query response.
  • A mutable memory location with dynamically checked borrow rules
  • A double-ended queue implemented with a growable ring buffer.
  • Meters consumed weight and a hard limit for the maximal consumable weight.
  • Contextual data pertaining to a specific list of XCM instructions.
  • The XCM executor.

Enums§

  • Aggregate message origin for the MessageQueue pallet.
  • Asset collection, defined either by a number of Assets or a single wildcard.
  • A general identifier for an instance of a non-fungible asset class.
  • An identifier of a pluralistic body.
  • A part of a pluralistic body.
  • Classification of whether an asset is fungible or not, along with a mandatory amount or instance.
  • Cross-Consensus Message: A message from one consensus system to another.
  • A single item in a path to describe the relative location of a consensus system.
  • Non-parent junctions that can be constructed, up to the length of 8. This specific Junctions implementation uses a Rust enum in order to make pattern matching easier.
  • A global identifier of a data structure existing within consensus.
  • Basically just the XCM (more general) version of ParachainDispatchOrigin.
  • Outcome of an XCM execution.
  • Errors that can happen when attempting to process a message with ProcessMessage::process_message().
  • Response data to a query.
  • Error result value when attempting to send an XCM message.
  • Identifies a UMP queue inside the MessageQueue pallet.
  • A single XCM message, together with its version code.
  • An optional weight limit.
  • A wildcard representing a set of assets.
  • Classification of whether an asset is fungible or not.
  • Error codes used in XCM. The first errors codes have explicit indices and are part of the XCM format. Those trailing are merely part of the XCM implementation; there is no expectation that they will retain the same index over time.
  • The aggregate XCMP message format.

Constants§

Traits§

Functions§

  • Conduct a 256-bit Blake2 hash.
  • Encodes the provided XCM message based on the message_kind.
  • Convenience function for using a SendXcm implementation. Just interprets the dest and wraps both in Some before passing them as mutable references into T::send_xcm.
  • Convenience function for using a SendXcm implementation. Just interprets the dest and wraps both in Some before passing them as mutable references into T::send_xcm.

Type Aliases§

  • A relative location which is constrained to be an interior location of the context.
  • An identifier for a query.
  • The block number type used by Polkadot. 32-bits will allow for 136 years of blocks assuming 1 block per second.
  • Result value when attempting to send an XCM message.
  • Type alias for Externalities implementation used in tests.
  • A hash type for identifying messages.

Derive Macros§

  • Derive parity_scale_codec::Encode and parity_scale_codec::EncodeLike for struct and enum.