Crate frame_support_procedural

Source
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 and HasReversibleKeyPrefix for tuple of Key.
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 the Call 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 to RuntimeCall, RuntimeEvent, RuntimeOrigin or PalletInfo in an impl statement that has #[register_default_impl] attached to indicate that this item is generated by construct_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§

CloneNoBound
Derive Clone but do not bound any generic.
DebugNoBound
Derive Debug but do not bound any generics.
DefaultNoBound
derive Default but do no bound any generic. Docs are at frame_support::DefaultNoBound.
EqNoBound
DeriveEq but do no bound any generic.
OrdNoBound
Derive Ord but do no bound any generic. Docs are at frame_support::OrdNoBound.
PalletError
PartialEqNoBound
Derive PartialEq but do not bound any generic.
PartialOrdNoBound
Derive PartialOrd but do not bound any generic. Docs are at frame_support::PartialOrdNoBound.
RuntimeDebugNoBound
Derive Debug, if std is enabled it uses frame_support::DebugNoBound, if std is not enabled it just returns "<wasm:stripped>". This behaviour is useful to prevent bloating the runtime WASM blob from unneeded code.