referrerpolicy=no-referrer-when-downgrade

Module frame_support::pallet_prelude

source ·
Expand description

Prelude to be used alongside pallet macro, for ease of use.

Re-exports§

Macros§

  • Generic function to mark an execution path as ONLY defensive.
  • Trigger a defensive failure if a condition is not met.
  • Evaluate $x:expr and if not true return Err($y:expr).

Structs§

Enums§

Constants§

Traits§

  • Performs addition that returns None instead of wrapping around on overflow.
  • Convenience type to work around the highly unergonomic syntax needed to invoke the functions of overloaded generic traits, in this case TryFrom and TryInto.
  • Performs division that returns None instead of panicking on division by zero and instead of wrapping around on underflow and overflow.
  • Performs multiplication that returns None instead of wrapping around on underflow or overflow.
  • Performs a left shift that returns None on shifts larger than or equal to the type width.
  • Performs a right shift that returns None on shifts larger than or equal to the type width.
  • Performs subtraction that returns None instead of wrapping around on underflow.
  • Trait that allows zero-copy read of value-references from slices in LE format.
  • Trait that allows zero-copy write of value-references to slices in LE format.
  • A trait for querying a single value from a type.
  • Items implementing MaxEncodedLen have a statically known maximum encoded size.
  • A type that implements Serialize, DeserializeOwned and Debug when in std environment or serde feature is activated.
  • A type that can be used in runtime structures.
  • Defines a multiplicative identity element for Self.
  • Implementors return their meta type information.
  • A trait for querying a single value from a type defined in the trait.
  • Provide validation for unsigned extrinsics.
  • Defines an additive identity element for Self.

Type Aliases§

  • An identifier for an inherent.
  • Minimum number of blocks a transaction will remain valid for. TransactionLongevity::max_value() means “forever”.
  • Priority for a transaction. Additive. Higher is better.
  • Tag for a transaction. No two transactions with the same tag should be placed on-chain.
  • Information on a transaction’s validity and, if valid, on how it relates to other transactions.

Attribute Macros§

  • The optional attribute #[inject_runtime_type] can be attached to RuntimeCall, RuntimeEvent, RuntimeOrigin or PalletInfo in an impl statement that has #[register_default_impl] attached to indicate that this item is generated by construct_runtime.
  • Attach this attribute to an impl statement that you want to use with #[derive_impl(..)].

Derive Macros§

  • Derive Clone but do not bound any generic.
  • Derive Debug but do not bound any generic.
  • 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 Eq but do not bound any generic.
  • Derive parity_scale_codec::MaxEncodedLen for struct and enum.
  • Derive PartialEq but do not bound any generic.
  • Derive [Debug], if std is enabled it uses frame_support::DebugNoBound, if std is not enabled it just returns "<wasm:stripped>". This behaviour is useful to prevent bloating the runtime WASM blob from unneeded code.