referrerpolicy=no-referrer-when-downgrade

Module pallet_prelude

Expand description

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

Functions§

ensure_authorized
Ensure that the origin o represents an extrinsic with authorized call. Returns Ok or an Err otherwise.
ensure_none
Ensure that the origin o represents an unsigned extrinsic. Returns Ok or an Err otherwise.
ensure_root
Ensure that the origin o represents the root. Returns Ok or an Err otherwise.
ensure_signed
Ensure that the origin o represents a signed extrinsic (i.e. transaction). Returns Ok with the account that signed the extrinsic or an Err otherwise.
ensure_signed_or_root
Ensure that the origin o represents either a signed extrinsic (i.e. transaction) or the root. Returns Ok with the account that signed the extrinsic, None if it was root, or an Err otherwise.

Type Aliases§

AccountIdFor
Type alias for the AccountId associated type of system config.
BlockNumberFor
Type alias for the BlockNumber associated type of system config.
ExtrinsicFor
Type alias for the Extrinsic associated type of system config.
HeaderFor
Type alias for the Header.
OriginFor
Type alias for the Origin associated type of system config.
RuntimeCallFor
Type alias for the RuntimeCall associated type of system config.