emit.gno

0.33 Kb ยท 12 lines
 1// Package emit demonstrates how to use the std.Emit() function
 2// to emit Gno events that can be used to track data changes off-chain.
 3// std.Emit is variadic; apart from the event name, it can take in any number of key-value pairs to emit.
 4package emit
 5
 6import (
 7	"std"
 8)
 9
10func Emit(value string) {
11	std.Emit("EventName", "key", value)
12}