Add event field names to HRMP Event variants (#1695)

Update the HRMP pallet to use field names for Event variants to improve
metadata for a better client experience.
Event variants are now structs instead of unnamed tuples.

Partially implements Substrate issue
[9903](https://github.com/paritytech/substrate/issues/9903) which
doesn't appear to have been moved to the monorepo.
This commit is contained in:
Dónal Murray
2023-09-28 11:02:08 +01:00
committed by GitHub
parent 769bdd3ff3
commit 4bc97e481f
6 changed files with 136 additions and 66 deletions
@@ -37,7 +37,12 @@ tests:
]
events:
- name: hrmp.HrmpChannelForceOpened
result: [*cp_id, *sp_id, *hrmp_proposed_max_capacity, *hrmp_proposed_max_message_size]
result: {
sender: *cp_id,
recipient: *sp_id,
proposed_max_capacity: *hrmp_proposed_max_capacity,
proposed_max_message_size: *hrmp_proposed_max_message_size
}
- name: Force Open HRMP Channel From AssetHub Parachain → Collectives Parachain
its:
- name: Alice calls hrmp.forceOpenHrmpChannel
@@ -56,4 +61,9 @@ tests:
]
events:
- name: hrmp.HrmpChannelForceOpened
result: [*sp_id, *cp_id, *hrmp_proposed_max_capacity, *hrmp_proposed_max_message_size]
result: {
sender: *sp_id,
recipient: *cp_id,
proposed_max_capacity: *hrmp_proposed_max_capacity,
proposed_max_message_size: *hrmp_proposed_max_message_size
}