-
Notifications
You must be signed in to change notification settings - Fork 376
Description
I'm submitting a ...
- Bug report
- Feature request
- Support request
- Other
ink! events are changing in version 5.0. See use-ink/ink#1827, and https://use.ink/5.x/basics/events/.
The most important change is that there is a new field on each event definition in the metadata: signature_topic which must now be used to identify the type of event being received. Previously the index of the event i.e its position in the json array was used to determine which event to decode.
Now when handling an event, the first topic of the substrate event is matched to that signature topic in the metadata. If the event is anonymous, there is no signature topic in that case the raw hex bytes of the event can be returned and leave it up to the user what to do there.
Event decoding here:
api/packages/api-contract/src/Abi/index.ts
Line 236 in 3bdf49b
| #createEvent = (spec: ContractEventSpecLatest, index: number): AbiEvent => { |