Expand description
Re-exports§
- pub use self::storage::storage_noop_guard::StorageNoopGuard;
- pub use self::dispatch::Callable;
- pub use self::dispatch::Parameter;
- pub use self::storage::migration;
- pub use self::storage::IterableStorageDoubleMap;
- pub use self::storage::IterableStorageMap;
- pub use self::storage::IterableStorageNMap;
- pub use self::storage::StorageDoubleMap;
- pub use self::storage::StorageMap;
- pub use self::storage::StorageNMap;
- pub use self::storage::StoragePrefixedMap;
- pub use self::storage::StorageValue;
- pub use sp_runtime;
Modules§
- crypto
- Utilities for dealing with crypto primitives. Sometimes we need to use these from inside WASM contracts, where crypto calculations have weak performance.
- dispatch
- Dispatch system. Contains a macro for defining runtime modules and generating values representing lazy module function calls.
- dispatch_context 
- Provides functions to interact with the dispatch context.
- errorDeprecated 
- generate_genesis_ config 
- Helper for generating the RuntimeGenesisConfiginstance for presets. Helper macro allowing to construct JSON representation of partially initialized structs.
- genesis_builder_ helper 
- Helper for implementing GenesisBuilder runtime API
Helper functions for implementing sp_genesis_builder::GenesisBuilderfor runtimes.
- inherent
- instances
- Some instance placeholder to be used in frame_support::palletattribute macro.
- migrations
- pallet_macros 
- Contains macro stubs for all of the pallet::macros
- pallet_prelude 
- Prelude to be used alongside pallet macro, for ease of use.
- storage
- Stuff to do with the runtime’s storage.
- testing_prelude 
- Prelude to be used for pallet testing, for ease of use.
- traits
- Traits and associated utilities for use in the FRAME environment.
- view_functions 
- Traits for querying pallet view functions.
- weights
- Re-exports sp-weightspublic API, and contains benchmarked weight constants specific to FRAME.
Macros§
- _std_enabled 
- _try_runtime_ and_ std_ not_ enabled 
- _try_runtime_ enabled 
- _try_runtime_ or_ std_ enabled 
- assert_err 
- Assert an expression returns an error specified.
- assert_err_ ignore_ postinfo 
- Assert an expression returns an error specified.
- assert_err_ with_ weight 
- Assert an expression returns error with the given weight.
- assert_error_ encoded_ size 
- Assert that the maximum encoding size does not exceed the value defined in
MAX_MODULE_ERROR_ENCODED_SIZEduring compilation.
- assert_noop 
- Evaluate an expression, assert it returns an expected Errvalue and that runtime storage has not been mutated (i.e. expression is a no-operation).
- assert_ok 
- Panic if an expression doesn’t evaluate to Ok.
- assert_storage_ noop 
- Evaluate any expression and assert that runtime storage has not been mutated (i.e. expression is a storage no-operation).
- build_struct_ json_ patch 
- Creates a JSON patch for given struct_type, supporting recursive field initialization.
- construct_runtime 
- Construct a runtime, with the given name and the given pallets.
- crate_to_ crate_ version 
- Convert the current crate version into a CrateVersion.
- defensive
- Generic function to mark an execution path as ONLY defensive.
- defensive_assert 
- Trigger a defensive failure if a condition is not met.
- ensure
- Evaluate $x:exprand if not true returnErr($y:expr).
- fail
- Return Err of the expression: return Err($expression);.
- impl_ensure_ origin_ with_ arg_ ignoring_ arg 
- Simple macro to explicitly implement EnsureOriginWithArg to be used on any type which
implements EnsureOrigin. This is quick and dirty, so you must use the type parameters O(the origin type),T(the argument type) andAccountId(if you are using theO: ..form).
- impl_filter_ stack 
- match_and_ insert 
- Macro that inserts some tokens after the first match of some pattern.
- match_type Deprecated 
- Create a type which implements the Containstrait for a particular type with syntax similar tomatches!.
- match_types 
- Create a type which implements the Containstrait for a particular type with syntax similar tomatches!.
- ord_parameter_ types 
- Macro for easily creating a new implementation of both the GetandContainstraits. Use exactly as withparameter_types, only the type must beOrd.
- parameter_types 
- Create new implementations of the Gettrait.
- parameter_types_ impl_ thread_ local 
- runtime_print 
- Print out a formatted message.
- std_enabled 
- Enable/disable the given code depending on
feature = "std"being enabled for the crate or not.
- try_runtime_ and_ std_ not_ enabled 
- Enable/disable the given code depending on
all(not(feature = "try-runtime"), not(feature = "std"))being enabled for the crate or not.
- try_runtime_ enabled 
- Enable/disable the given code depending on
feature = "try-runtime"being enabled for the crate or not.
- try_runtime_ or_ std_ enabled 
- Enable/disable the given code depending on
any(feature = "try-runtime", feature = "std")being enabled for the crate or not.
Structs§
- Blake2_128 
- Hash storage keys with blake2 128
- Blake2_256 
- Hash storage keys with blake2 256
- Blake2_128Concat 
- Hash storage keys with concat(blake2_128(key), key)
- BoundedBTree Map 
- A bounded map based on a B-Tree.
- BoundedBTree Set 
- A bounded set based on a B-Tree.
- BoundedSlice 
- A bounded slice.
- BoundedVec 
- A bounded vector.
- Identity
- Store the key directly.
- PalletId 
- A pallet identifier. These are per pallet and should be stored in a registry somewhere.
- Twox64Concat 
- Hash storage keys with concat(twox64(key), key)
- Twox128
- Hash storage keys with twox 128
- Twox256
- Hash storage keys with twox 256
- WeakBounded Vec 
- A weakly bounded vector.
Enums§
- Never
- A type that cannot be instantiated.
Constants§
- LOG_TARGET 
- A unified log target for support operations.
- MAX_MODULE_ ERROR_ ENCODED_ SIZE 
- The number of bytes of the module-specific errorfield defined inModuleError. In FRAME, this is the maximum encoded size of a pallet error type.
Traits§
- Hashable
- Printable
- Trait for things which can be printed from the runtime.
- ReversibleStorage Hasher 
- Hasher to use to hash keys to insert to storage.
- StorageHasher 
- Hasher to use to hash keys to insert to storage.
Functions§
Type Aliases§
- ConsensusEngine Id 
- Consensus engine unique ID.
Attribute Macros§
- derive_impl 
- This attribute can be used to derive a full implementation of a trait based on a local partial impl and an external impl containing defaults that can be overridden in the local impl.
- pallet
- The pallet macro has 2 purposes:
- register_default_ impl 
- Attach this attribute to an impl statement that you want to use with
#[derive_impl(..)].
- require_transactional 
- Assert the annotated function is executed within a storage transaction.
- runtime
- Construct a runtime, with the given name and the given pallets.
- storage_alias 
- Generate a #[pallet::storage]alias outside of a pallet.
- transactional
- Execute the annotated function in a new storage transaction.
Derive Macros§
- CloneNoBound 
- Derive Clonebut do not bound any generic.
- DebugNoBound 
- Derive Debugbut do not bound any generic.
- DefaultNoBound 
- Derive Defaultbut do not bound any generic.
- EqNoBound 
- Derive Eqbut do not bound any generic.
- OrdNoBound 
- Derive Ordbut do not bound any generic.
- PalletError 
- PartialEqNo Bound 
- Derive PartialEqbut do not bound any generic.
- PartialOrdNo Bound 
- Derive PartialOrdbut do not bound any generic.
- RuntimeDebug NoBound 
- Derive [Debug], ifstdis enabled it usesframe_support::DebugNoBound, ifstdis not enabled it just returns"<wasm:stripped>". This behaviour is useful to prevent bloating the runtime WASM blob from unneeded code.