Closed
Description
Due to ink!'s design it is not possible to share event definitions between multiple contracts since events can only be defined in the ink! module scope directly.
In order to more extensively use the upcoming trait features we want to make it possible for users to define events to be used in multiple contracts.
For this we will need a new attribute macro #[ink::event_definition]
or just a derive macro #[derive(ink::Event)]
that will setup everything required for ink! events. There will be some initial limitations. E.g. events can only be enum
or struct
with certain properties.
However, this will allow to define events in some library and use the same event definition in many ink! smart contract or trait definitions.