Commit 13382ea8 authored by Andrew Jones's avatar Andrew Jones

Revert "Remove EmitEvent trait import"

This reverts commit 078fb09f
parent ac1bdc13
Pipeline #88404 canceled with stages
in 3 minutes and 29 seconds
......@@ -54,6 +54,13 @@ impl GenerateCode for Storage<'_> {
let message_impls = self.generate_message_impls();
let storage_struct = self.generate_storage_struct();
let use_emit_event = if !self.contract.events.is_empty() {
// Required to allow for `self.env().emit_event(..)` in messages and constructors.
quote! { use __ink_private::EmitEvent as _; }
} else {
quote! {}
};
quote_spanned!(storage_span =>
#[doc(hidden)]
#conflic_depedency_cfg
......@@ -74,6 +81,7 @@ impl GenerateCode for Storage<'_> {
#[allow(unused_imports)]
use ink_lang::Env as _;
#use_emit_event
#message_impls
};
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment