Crate frame_support_procedural
source ·Expand description
Proc macro of Support code for the runtime.
Macros§
- Internal macro used by
frame_support
to create tt-call-compliant macros - Internal macro use by frame_support to generate dummy part checker for old pallet declaration
- Construct a runtime, with the given name and the given pallets.
- Macro used internally in FRAME to generate the crate version for a pallet.
- This macro is meant to be used by frame-support only. It implements the trait
HasKeyPrefix
andHasReversibleKeyPrefix
for tuple ofKey
. - Macro that inserts some tokens after the first match of some pattern.
Attribute Macros§
- An attribute macro used to declare a benchmark within a benchmarking module. Must be attached to a function definition containing an
#[extrinsic_call]
or#[block]
attribute. - An attribute macro that can be attached to a (non-empty) module declaration. Doing so will designate that module as a benchmarking module.
- An attribute macro used to specify that a block should be the measured portion of the enclosing benchmark function, This attribute is also used as a boundary designating where the benchmark setup code ends, and the benchmark verification code begins.
- Each dispatchable may also be annotated with the
#[pallet::call_index($idx)]
attribute, which explicitly defines the codec index for the dispatchable function in theCall
enum.
- 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.
- Define a module inside a
dynamic_params
module that contains dynamic parameters. - Mark a module that contains dynamic parameters.
- An attribute macro used to specify the extrinsic call inside a benchmark function, and also used as a boundary designating where the benchmark setup code ends, and the benchmark verification code begins.
- The optional attribute
#[inject_runtime_type]
can be attached toRuntimeCall
,RuntimeEvent
,RuntimeOrigin
orPalletInfo
in an impl statement that has#[register_default_impl]
attached to indicate that this item is generated byconstruct_runtime
. - An attribute macro that can be attached to a (non-empty) module declaration. Doing so will designate that module as an instance benchmarking module.
- Attach this attribute to an impl statement that you want to use with
#[derive_impl(..)]
.
- Construct a runtime, with the given name and the given pallets.
- Allows defining conditions for a task to run.
- Allows defining an index for a task.
- Allows defining an iterator over available work items for a task.
- Allows defining the weight of a task.
- Allows you to define some service work that can be recognized by a script or an off-chain worker.
- 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 generics. - derive
Default
but do no bound any generic. Docs are atframe_support::DefaultNoBound
. - DeriveEq but do no bound any generic.
- Derive
Ord
but do no bound any generic. Docs are atframe_support::OrdNoBound
. - Derive
PartialEq
but do not bound any generic. - Derive
PartialOrd
but do not bound any generic. Docs are atframe_support::PartialOrdNoBound
. - Derive
Debug
, ifstd
is enabled it usesframe_support::DebugNoBound
, ifstd
is not enabled it just returns"<wasm:stripped>"
. This behaviour is useful to prevent bloating the runtime WASM blob from unneeded code.