Attribute Macro frame_support::pallet_macros::call_index
source · #[call_index]
Expand description
Enforce the index of a variant in the generated enum Call
.
See call
for more information.
All call indexes start from 0, until it encounters a dispatchable function with a
defined call index. The dispatchable function that lexically follows the function with
a defined call index will have that call index, but incremented by 1, e.g. if there are
3 dispatchable functions fn foo
, fn bar
and fn qux
in that order, and only fn bar
has a call index of 10, then fn qux
will have an index of 11, instead of 1.
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.
Documentation for this macro can be found at frame_support::pallet_macros::call_index
.