Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

emit.gno

1.00 Kb · 35 lines
 1package ucs03_zkgm
 2
 3import (
 4	"gno.land/p/onbloc/ibc/union/types"
 5)
 6
 7func EmitRecvError(_ int, rlm realm, sourceChannel types.ChannelId, destinationChannel types.ChannelId, reason string) {
 8	assertIsRlmCurrent(0, rlm)
 9	assertIsProxyRealm(0, rlm)
10	emitRecvError(sourceChannel, destinationChannel, reason)
11}
12
13func EmitNativeReleased(_ int, rlm realm, denom string, recipient address, amount int64) {
14	assertIsRlmCurrent(0, rlm)
15	if rlm.PkgPath() != proxyPkgPath {
16		return
17	}
18	emitZkgmNativeReleasedEvent(rlm.Previous().PkgPath(), denom, recipient, amount)
19}
20
21func EmitForwardInFlightSet(_ int, rlm realm, packetHash types.H256, parentPacketHash types.H256) {
22	assertIsRlmCurrent(0, rlm)
23	if rlm.PkgPath() != proxyPkgPath {
24		return
25	}
26	emitZkgmForwardInFlightSetEvent(packetHash, parentPacketHash)
27}
28
29func EmitForwardInFlightPopped(_ int, rlm realm, packetHash types.H256, found bool) {
30	assertIsRlmCurrent(0, rlm)
31	if rlm.PkgPath() != proxyPkgPath {
32		return
33	}
34	emitZkgmForwardInFlightPoppedEvent(packetHash, found)
35}