diff --git a/pkg/relay/ethereum/events.go b/pkg/relay/ethereum/events.go index 6dfdfff..2d2eeb5 100644 --- a/pkg/relay/ethereum/events.go +++ b/pkg/relay/ethereum/events.go @@ -29,7 +29,8 @@ var ( abiSendPacket, abiRecvPacket, abiWriteAcknowledgement, - abiAcknowledgePacket abi.Event + abiAcknowledgePacket, + abiChannelUpgradeOpen abi.Event ) func init() { @@ -44,6 +45,7 @@ func init() { abiRecvPacket = abiIBCHandler.Events["RecvPacket"] abiWriteAcknowledgement = abiIBCHandler.Events["WriteAcknowledgement"] abiAcknowledgePacket = abiIBCHandler.Events["AcknowledgePacket"] + abiChannelUpgradeOpen = abiIBCHandler.Events["ChannelUpgradeOpen"] } func (chain *Chain) findSentPackets(ctx core.QueryContext, fromHeight uint64) (core.PacketInfoList, error) { diff --git a/pkg/relay/ethereum/msg.go b/pkg/relay/ethereum/msg.go index 54b98d8..ab33dad 100644 --- a/pkg/relay/ethereum/msg.go +++ b/pkg/relay/ethereum/msg.go @@ -134,6 +134,16 @@ func (c *Chain) parseMsgEventLogs(logs []*types.Log) ([]core.MsgEventLog, error) TimeoutHeight: clienttypes.Height(ev.Packet.TimeoutHeight), TimeoutTimestamp: time.Unix(0, int64(ev.Packet.TimeoutTimestamp)), } + case abiChannelUpgradeOpen.ID: + ev, err := c.ibcHandler.ParseChannelUpgradeOpen(*log) + if err != nil { + return nil, fmt.Errorf("failed to parse ChannelUpgradeOpen event: logIndex=%d, log=%v", i, log) + } + event = &core.EventUpgradeChannel{ + PortID: ev.PortId, + ChannelID: ev.ChannelId, + UpgradeSequence: ev.UpgradeSequence, + } default: event = &core.EventUnknown{Value: log} }