From 252577668f81e62062e24f63f2feca98ea60dccc Mon Sep 17 00:00:00 2001 From: n3wbie Date: Wed, 5 Jun 2024 13:26:47 +0900 Subject: [PATCH] refactor: use GetContext to get macine context --- gnovm/stdlibs/std/emit_event.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnovm/stdlibs/std/emit_event.go b/gnovm/stdlibs/std/emit_event.go index 0135fe80a37..ed198022116 100644 --- a/gnovm/stdlibs/std/emit_event.go +++ b/gnovm/stdlibs/std/emit_event.go @@ -27,7 +27,7 @@ func X_emit(m *gno.Machine, typ string, attrs []string) { PrevPkgAddr: prevAddr, } - ctx := m.Context.(ExecContext) + ctx := GetContext(m) evt := gnoEvent{ OrigCaller: ctx.OrigCaller.String(), @@ -38,7 +38,7 @@ func X_emit(m *gno.Machine, typ string, attrs []string) { Type: typ, Attributes: eventAttrs, } - ctx := GetContext(m) + ctx.EventLogger.EmitEvent(evt) }