ink
ink copied to clipboard
Event defintions with generics
Follow up from https://github.com/paritytech/ink/pull/1827#issuecomment-1625583771.
Currently the Event derive does not support generics. We should consider adding support for generic event definitions, that would allow the event definition to be used across contracts with different Environment types e.g.
#[ink::event]
pub struct Transfer<E: ink::env::Environment> {
#[ink(topic)]
from: Option<E::AccountId>,
#[ink(topic)]
to: Option<E::AccountId>,
value: E::Balance,
}