Expand description
Proc macro of Support code for the runtime.
Macros§
- __
create_ tt_ macro - Internal macro used by
frame_support
to create tt-call-compliant macros - __
generate_ dummy_ part_ checker - Internal macro use by frame_support to generate dummy part checker for old pallet declaration
- construct_
runtime - Construct a runtime, with the given name and the given pallets.
- crate_
to_ crate_ version - Macro used internally in FRAME to generate the crate version for a pallet.
- impl_
key_ prefix_ for_ tuples - This macro is meant to be used by frame-support only.
It implements the trait
HasKeyPrefix
andHasReversibleKeyPrefix
for tuple ofKey
. - match_
and_ insert - Macro that inserts some tokens after the first match of some pattern.
Attribute Macros§
- benchmark
- 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. - benchmarks
- An attribute macro that can be attached to a (non-empty) module declaration. Doing so will designate that module as a benchmarking module.
- block
- 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.
- call
- call_
index - 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. - compact
- composite_
enum
- config
- constant
- constant_
name
- 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.
- disable_
frame_ system_ supertrait_ check
- disable_
try_ decode_ storage
- dynamic_
pallet_ params - Define a module inside a
dynamic_params
module that contains dynamic parameters. - dynamic_
params - Mark a module that contains dynamic parameters.
- error
- event
- extra_
constants
- extrinsic_
call - 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.
- feeless_
if
- generate_
deposit
- genesis_
build
- genesis_
config
- getter
- hooks
- import_
section
- include_
metadata
- inherent
- inject_
runtime_ type - 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
. - instance_
benchmarks - An attribute macro that can be attached to a (non-empty) module declaration. Doing so will designate that module as an instance benchmarking module.
- no_
default
- no_
default_ bounds
- origin
- pallet
- pallet_
section
- register_
default_ impl - Attach this attribute to an impl statement that you want to use with
#[derive_impl(..)]
. - require_
transactional
- runtime
- Construct a runtime, with the given name and the given pallets.
- storage
- storage_
alias
- storage_
prefix
- storage_
version
- task_
condition - Allows defining conditions for a task to run.
- task_
index - Allows defining an index for a task.
- task_
list - Allows defining an iterator over available work items for a task.
- task_
weight - Allows defining the weight of a task.
- tasks_
experimental - Allows you to define some service work that can be recognized by a script or an off-chain worker.
- transactional
- Execute the annotated function in a new storage transaction.
- type_
value
- unbounded
- validate_
unsigned
- view_
functions_ experimental
- weight
- whitelist_
storage
Derive Macros§
- Clone
NoBound - Derive
Clone
but do not bound any generic. - Debug
NoBound - Derive
Debug
but do not bound any generics. - Default
NoBound - derive
Default
but do no bound any generic. Docs are atframe_support::DefaultNoBound
. - EqNo
Bound - DeriveEq but do no bound any generic.
- OrdNo
Bound - Derive
Ord
but do no bound any generic. Docs are atframe_support::OrdNoBound
. - Pallet
Error - Partial
EqNo Bound - Derive
PartialEq
but do not bound any generic. - Partial
OrdNo Bound - Derive
PartialOrd
but do not bound any generic. Docs are atframe_support::PartialOrdNoBound
. - Runtime
Debug NoBound - 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.