Open
Description
During the adaption of the event decoding for smart contract for ink! v5, #5791, it became clear that the prior and current implementation can't handle all circumstances gracefully.
The current implementation supports:
- decoding of events emitted by the called contract for ink v4 and prior,
- decoding of events emitted by the called contract for new events 2.0 in ink v5,
- decoding anonymous events emitted by the called contract, if the anonymous event can be determined (single possibility, which event it could have been), otherwise it throws an error.
What could be improved:
- handle inability to determine anonymous event more gracefully by not decoding it and just returning bytes. The overall flow of how the decoding is done, does not allow for this now afaik.
Another usecase for this feature would be in handling foreign events. Foreign events are events emitted by the called contract but are defined in a different contract which was invoked by the called contract. For what I know this case of decoding events from a contract which ABI we don't have is not handled and will result in errors being thrown.
More information about this behavior you can find here:
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
P3 - Low