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§

  • 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.
  • 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.

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.