Module frame_support::pallet_prelude [−][src]
Expand description
Prelude to be used alongside pallet macro, for ease of use.
Re-exports
pub use crate::dispatch::DispatchResult;pub use crate::dispatch::DispatchResultWithPostInfo;pub use crate::dispatch::Parameter;pub use crate::ensure;pub use crate::inherent::ProvideInherent;pub use crate::storage;pub use crate::storage::bounded_vec::BoundedVec;pub use crate::storage::types::OptionQuery;pub use crate::storage::types::ValueQuery;pub use crate::weights::DispatchClass;pub use crate::weights::Pays;pub use crate::weights::Weight;Structs
Hash storage keys with blake2 128
Hash storage keys with concat(blake2_128(key), key)
Hash storage keys with blake2 256
Implement Get<u32> and Get<Option<u32>> using the given const.
Implement Get by returning Default for any type that implements Default.
Store the key directly.
Inherent data to include in a block.
A type used exclusively by storage maps as their key type.
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 values for an arbitrary number of keys in the form of
(Key<Hasher1, key1>, Key<Hasher2, key2>, ..., Key<HasherN, keyN>).
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.
Some sort of check on the origin is performed by this object.
A trait to define the build function of a genesis config, T and I are placeholder for pallet trait and pallet instance.
A trait for querying a single value from a type.
Provides information about the storage version of a pallet.
The pallet hooks trait. Implementing this lets you express some logic to execute.
Trait to be used when types are exactly same.
Items implementing MaxEncodedLen have a statically known maximum encoded size.
A type that implements Serialize, DeserializeOwned and Debug when in std environment.
A type that can be used in runtime structures.
Provides information about the pallet setup in the runtime.
A trait to give information about storage.
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::DebugNoBound.
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 MaxEncodedLen.
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.