software-mansion/starknet.py

[BUG] different attribute name in EventType in comparison with Abi.Event

UgAr-study opened this issue · 1 comments

What happened

AbiV2Parser produces abi which attribute 'events' has type Dict[str, EventType], meanwhile AbiParser produces one with type Dict[str, Event].
EventType has fields name and types, but Event has fields name and data. Serialization works with Event rn, not with EventType. An exception is raised when you try to pass object of type EventType to serializer_for_event because it has no attribute 'data' ('types' instead).

Stack trace

Steps to reproduce

  1. make a contract with cairo version = 2 and try to make a serialization for some of its events.

SDK Version

0.18.3

Python version

3.9

What operating system are you using?

Linux

Is there an existing issue for this?

  • I have searched the existing issues and verified no issue exits for this problem.