Autogenerate `new` for events.
zie1ony opened this issue · comments
Maciej Zieliński commented
It's common to implement sth like this:
#[odra::event]
pub struct Mint {
recipient: Address,
token_id: String,
data: String
}
impl Mint {
pub fn new(recipient: Address, token_id: String, data: String) -> Self {
Self {
recipient,
token_id,
data
}
}
}
new
could be derived by default with an option to remove it with odra::event(skip_new)
.