Skip to content

api-contracts: handle foreign events gracefully #5803

Open
@peetzweg

Description

@peetzweg

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:

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

No one assigned

    Labels

    Help WantedTasks open for external contributions, suitable for independent or collaborative work.P3 - LowNon-essential improvements or minor fixes. Can be scheduled flexibly as time permits.

    Type

    No type

    Projects

    Status

    P3 - Low

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions