Expand description

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

Re-exports

pub use frame_support::traits::GenesisBuild;
pub use frame_support::debug;
pub use frame_support::ensure;
pub use frame_support::storage;
pub use frame_support::traits::Get;
pub use frame_support::traits::Hooks;
pub use frame_support::traits::IsType;
pub use frame_support::traits::GetPalletVersion;
pub use frame_support::traits::EnsureOrigin;
pub use frame_support::dispatch::DispatchResultWithPostInfo;
pub use frame_support::dispatch::Parameter;
pub use frame_support::weights::DispatchClass;
pub use frame_support::weights::Pays;
pub use frame_support::weights::Weight;
pub use frame_support::storage::types::ValueQuery;
pub use frame_support::storage::types::OptionQuery;

Structs

Hash storage keys with blake2 128

Hash storage keys with concat(blake2_128(key), key)

Hash storage keys with blake2 256

Store the key directly.

Inherent data to include in a block.

Zero-sized type used to mark things that “act like” they own a T.

A type that allow to store values for (key1, key2) couple. Similar to StorageMap but allow to iterate and remove value associated to first key.

A type that allow to store value for given key. Allowing to insert/remove/iterate on values.

A type that allow to store a value.

Hash storage keys with concat(twox64(key), key)

Hash storage keys with twox 128

Hash storage keys with twox 256

Information concerning a valid transaction.

Enums

Reason why a dispatch call failed.

An invalid transaction validity.

The source of the transaction.

Errors that can occur while checking the validity of a transaction.

An unknown transaction validity.

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 type that implements Serialize, DeserializeOwned and Debug when in std environment.

A type that can be used in runtime structures.

A pallet that provides or verifies an inherent extrinsic.

Something that can validate unsigned extrinsics for the transaction pool.

Type Definitions

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.

Derive Macros

Derive Clone but do not bound any generic. Docs are at frame_support::CloneNoBound.

Derive Debug but do not bound any generics. Docs are at frame_support::DeriveNoBounds.

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 no bound any generic. Docs are at frame_support::EqNoBound.

Derive PartialEq but do not bound any generic. Docs are at frame_support::PartialEqNoBound.

Derive Debug, if std is enabled it uses frame_support::DebugNoBound, if std is not enabled it just returns "<stripped>". This behaviour is useful to prevent bloating the runtime WASM blob from unneeded code.