-
Notifications
You must be signed in to change notification settings - Fork 469
Closed
Labels
A-ink_lang[ink_lang] Work item[ink_lang] Work itemB-designDesigning a new component, interface or functionality.Designing a new component, interface or functionality.B-enhancementNew feature or requestNew feature or request
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.
Metadata
Metadata
Assignees
Labels
A-ink_lang[ink_lang] Work item[ink_lang] Work itemB-designDesigning a new component, interface or functionality.Designing a new component, interface or functionality.B-enhancementNew feature or requestNew feature or request