Open gupnik opened 1 year ago
The CI pipeline was cancelled due to failure one of the required jobs. Job name: test-linux-stable-int Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3413012
#[frame::pallet_index]
can be optionally attached to a pallet to override its index
The index should be required and not be optional.
#[frame::pallet_index]
can be optionally attached to a pallet to override its indexThe index should be required and not be optional.
@bkchr By default, the index is derived from the order in which the pallets appear in the struct. If this attribute is specified, this default index is overridden. This is consistent with the current behaviour of construct_runtime
. Do we want to get rid of this altogether?
The indexes should be obligatory.
Fixes https://github.com/paritytech/polkadot-sdk/issues/232
This PR introduces outer-macro approach for
construct_runtime
as discussed in the linked issue. It looks like the following:Features
#[frame::runtime]
attached to a struct defines the main runtime#[frame::pallets]
attached to a struct defines the pallets in the runtime#[frame::derive]
attached to this struct defines the types generated byconstruct_runtime
#[frame::pallet_index]
can be optionally attached to a pallet to override its index#[frame::disable_call]
can be optionally attached to a pallet to disable its callsTemplateModule: pallet_template<Instance>
Todo
#[frame::disable_unsigned]
to disable unsigned callsExtension