Implement #[pallet::composite_enum] (#13722)

* Implement #[pallet::hold_reason]

* Appease clippy

* cargo fmt

* Update test expectations

* Update test expectations

* Support composite_enum attribute instead

* Update test expectations

* Change hold_reason to composite_enum

* Add UI test for unsupported identifier when using composite_enum

* Fix comment

* Add documentation for pallet::composable_enum

* More docs

* cargo fmt
This commit is contained in:
Keith Yeung
2023-04-04 20:28:46 +08:00
committed by GitHub
parent c268f3d3c8
commit 1a55f961c6
26 changed files with 682 additions and 11 deletions
@@ -268,6 +268,10 @@ fn construct_runtime_final_expansion(
let inherent =
expand::expand_outer_inherent(&name, &block, &unchecked_extrinsic, &pallets, &scrate);
let validate_unsigned = expand::expand_outer_validate_unsigned(&name, &pallets, &scrate);
let freeze_reason = expand::expand_outer_freeze_reason(&pallets, &scrate);
let hold_reason = expand::expand_outer_hold_reason(&pallets, &scrate);
let lock_id = expand::expand_outer_lock_id(&pallets, &scrate);
let slash_reason = expand::expand_outer_slash_reason(&pallets, &scrate);
let integrity_test = decl_integrity_test(&scrate);
let static_assertions = decl_static_assertions(&name, &pallets, &scrate);
@@ -310,6 +314,14 @@ fn construct_runtime_final_expansion(
#validate_unsigned
#freeze_reason
#hold_reason
#lock_id
#slash_reason
#integrity_test
#static_assertions