Expand description

Support code for the runtime.

Re-exports

pub use serde;
pub use self::storage::StorageValue;
pub use self::storage::StorageMap;
pub use self::storage::StorageDoubleMap;
pub use self::storage::StoragePrefixedMap;
pub use self::storage::IterableStorageMap;
pub use self::storage::IterableStorageDoubleMap;
pub use self::storage::migration;
pub use self::dispatch::Parameter;
pub use self::dispatch::Callable;
pub use sp_runtime;

Modules

Runtime debugging and logging utilities.

Dispatch system. Contains a macro for defining runtime modules and generating values representing lazy module function calls.

Macro for declaring a module error.

Macros that define an Event types. Events can be used to easily report changes or conditions in your runtime to external entities like users, chain explorers, or dApps.

Macros for generating the runtime genesis config.

Some instance placeholder to be used in frame_support::pallet attribute macro.

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

Stuff to do with the runtime’s storage.

Traits for FRAME.

Primitives for transaction weighting.

Macros

Helper macro for impl_outer_config

Assert an expression returns an error specified.

Assert an expression returns an error specified.

Assert an expression returns error with the given weight.

Evaluate an expression, assert it returns an expected Err value and that runtime storage has not been mutated (i.e. expression is a no-operation).

Panic if an expression doesn’t evaluate to Ok.

Evaluate any expression and assert that runtime storage has not been mutated (i.e. expression is a storage no-operation).

Construct a runtime, with the given name and the given modules.

Convert the current crate version into a PalletVersion.

Declare an error type for a runtime module.

Implement the Event for a module.

Declares a Module struct and a Call enum, which implements the dispatch logic.

Declares strongly-typed wrappers around codec-compatible types in storage.

Evaluate $x:expr and if not true return Err($y:expr).

Return Err of the expression: return Err($expression);.

Implement the runtime genesis configuration.

Implement a meta-dispatch module to dispatch to other dispatchers.

Constructs an Event type for a runtime. This is usually called automatically by the construct_runtime macro.

Implement the outer inherent. All given modules need to implement ProvideInherent.

Constructs an Origin type for a runtime. This is usually called automatically by the construct_runtime macro. See also __create_decl_macro.

Implement ValidateUnsigned for Runtime. All given modules need to implement ValidateUnsigned.

Implements the metadata support for the given runtime and all its modules.

Macro for easily creating a new implementation of both the Get and Contains traits. Use exactly as with parameter_types, only the type must be Ord.

Create new implementations of the Get trait.

Print out a formatted message.

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.

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

Hash storage keys with twox 128

Hash storage keys with twox 256

Enums

A type that cannot be instantiated.

The void type - it cannot exist.

Traits

Trait for things which can be printed from the runtime.

Hasher to use to hash keys to insert to storage.

Hasher to use to hash keys to insert to storage.

Functions

Print something that implements Printable from the runtime.

Type Definitions

Consensus engine unique ID.

Attribute Macros

pallet attribute macro allows to define a pallet to be used in construct_runtime!.

Assert the annotated function is executed within a storage transaction.

Execute the annotated function in a new storage transaction.

Derive Macros

Derive Clone but do not bound any generic.

Derive Debug but do not bound any generic.

Derive Eq but do not bound any generic.

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 "<stripped>". This behaviour is useful to prevent bloating the runtime WASM blob from unneeded code.