Crate xcm_emulator

source

Re-exports§

Modules§

  • Utilities for formatting and printing Strings.
  • Simple sr25519 (Schnorr-Ristretto) API.

Macros§

Structs§

  • Abridged version of HrmpChannel (from the Hrmp parachains host runtime module) meant to be used by a parachain or PDK such as cumulus.
  • All balance information for an account.
  • A unit struct which can be converted into a Location of the inner parents value.
  • A Vec of Assets.
  • A bounded slice.
  • A hash map implemented with quadratic probing and SIMD lookup.
  • Parachain head data included in the chain.
  • A type that uniquely identifies an HRMP channel. An HRMP channel is established between two paras. In text, we use the notation (A, B) to specify a channel between A and B. The channels are unidirectional, meaning that (A, B) and (B, A) refer to different channels. The convention is that we use the first item tuple for the sender and the second for the recipient. Only one channel is allowed between two participants in one direction, i.e. there cannot be 2 different channels identified by (A, B). A channel with the same para id in sender and recipient is invalid. That is, however, not enforced.
  • A relative path between state-bearing consensus systems.
  • The Pallet struct, the main type that implements traits and standalone functions within the pallet.
  • A mutual exclusion primitive useful for protecting shared data
  • Unique identifier of a parachain.
  • The inherent data that is passed by the collator to the parachain runtime.
  • The Pallet struct, the main type that implements traits and standalone functions within the pallet.
  • A unit struct which can be converted into a Location of parents value 1.
  • The validation data provides information about how to create the inputs for validation of a candidate. This information is derived from the chain state and will vary from para to para, although some fields may be the same for every para.
  • Zero-sized type used to mark things that “act like” they own a T.
  • A mutable memory location with dynamically checked borrow rules
  • Builds a sproof (portmanteau of ‘spoof’ and ‘proof’) of the relay chain state.
  • Struct containing data needed for a storage.
  • The Pallet struct, the main type that implements traits and standalone functions within the pallet.
  • Struct that helps with tests where either dispatchables or assertions need to be reused. The struct keeps the test’s arguments of your choice in the generic Args. These arguments can be easily reused and shared between the assertion functions and dispatchable functions, which are also stored in Test. Origin corresponds to the chain where the XCM interaction starts with an initial execution. Destination corresponds to the last chain where an effect of the initial execution is expected to happen. Hops refer to all the ordered intermediary chains an initial XCM execution can provoke some effect on.
  • Struct that keeps account’s id and balance
  • Default Args provided by xcm-emulator to be stored in a Test instance
  • Auxiliar struct to help creating a new Test instance
  • A double-ended queue implemented with a growable ring buffer.
  • Meters consumed weight and a hard limit for the maximal consumable weight.

Enums§

Constants§

  • Bridged messages, each message is: BridgeMessage
  • Downward messages that already processed by parachains, each message is: (to_para_id, relay_block_number, Vec<u8>)
  • Downward messages, each message is: (to_para_id, [(relay_block_number, msg)])
  • Horizontal messages, each message is: (to_para_id, [(from_para_id, relay_block_number, msg)])
  • Flag indicating if global variables have been initialized for a certain Network
  • Most recent HeadData of each parachain, encoded.
  • Parachains Ids a the Network
  • Upward messages, each message is: (from_para_id, msg)

Traits§

  • Numbers which have upper and lower bounds
  • Means of converting a location into an account identifier.
  • ? formatting.
  • Trait that allows zero-copy read of value-references from slices in LE format.
  • Used for immutable dereferencing operations, like *v.
  • Something that should be called when a downward message is received.
  • Trait that allows zero-copy write of value-references to slices in LE format.
  • A marker trait that tells the compiler that a type encode to the same representation as another type.
  • Can enqueue messages for multiple origins.
  • Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E>.
  • A trait for querying a single value from a type.
  • Something which fulfills the abstract idea of a Substrate header. It has types for a Number, a Hash and a Hashing. It provides access to an extrinsics_root, state_root and parent_hash, as well as a digest and a block number.
  • The pallet hooks trait. This is merely an umbrella trait for:
  • Items implementing MaxEncodedLen have a statically known maximum encoded size.
  • Configuration trait of this pallet.
  • Methods available on frame_system::Config::RuntimeOrigin.
  • Trait suitable for typical cryptographic PKI key pair type.
  • Can process messages from a specific origin.
  • Can service queues and execute overweight messages.
  • Configuration trait of this pallet.
  • Something that should be called for each batch of messages received over XCMP.

Functions§

  • Do a Blake2 256-bit hash and return result.
  • Returns the name of a type as a string slice.

Type Aliases§

  • Some way of identifying an account on the chain. We intentionally make it equivalent to the public key of our transaction signing scheme.
  • Balance of an account.
  • Type alias for the BlockNumber associated type of system config.
  • This is the legacy return type of Dispatchable. It is still exposed for compatibility reasons. The new return type is DispatchResultWithInfo. FRAME runtimes should use frame_support::dispatch::DispatchResult.
  • The block number type used by Polkadot. 32-bits will allow for 136 years of blocks assuming 1 block per second.
  • The block number type used by Polkadot. 32-bits will allow for 136 years of blocks assuming 1 block per second.
  • Type alias for Externalities implementation used in tests.
  • A hash type for identifying messages.

Derive Macros§

  • Derive macro generating an impl of the trait Debug.
  • Derive parity_scale_codec::Decode and for struct and enum.
  • Derive parity_scale_codec::Encode and parity_scale_codec::EncodeLike for struct and enum.
  • Derive parity_scale_codec::MaxEncodedLen for struct and enum.