diff --git a/modules/core/04-channel/v2/keeper/events.go b/modules/core/04-channel/v2/keeper/events.go index b20273d74bf..1c2140d2835 100644 --- a/modules/core/04-channel/v2/keeper/events.go +++ b/modules/core/04-channel/v2/keeper/events.go @@ -33,14 +33,15 @@ func EmitWriteAcknowledgementEvents(ctx context.Context, packet types.Packet, ac // TODO: https://github.com/cosmos/ibc-go/issues/7386 } -// EmitCreateChannelEvent emits a channel create event. -func (*Keeper) EmitCreateChannelEvent(ctx context.Context, channelID string) { +// emitCreateChannelEvent emits a channel create event. +func (*Keeper) emitCreateChannelEvent(ctx context.Context, channelID, clientID string) { sdkCtx := sdk.UnwrapSDKContext(ctx) sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeCreateChannel, sdk.NewAttribute(types.AttributeKeyChannelID, channelID), + sdk.NewAttribute(types.AttributeKeyClientID, clientID), ), sdk.NewEvent( sdk.EventTypeMessage, diff --git a/modules/core/04-channel/v2/keeper/msg_server.go b/modules/core/04-channel/v2/keeper/msg_server.go index 6bda4404531..39d376aac30 100644 --- a/modules/core/04-channel/v2/keeper/msg_server.go +++ b/modules/core/04-channel/v2/keeper/msg_server.go @@ -29,7 +29,7 @@ func (k *Keeper) CreateChannel(goCtx context.Context, msg *types.MsgCreateChanne k.SetCreator(ctx, channelID, msg.Signer) k.SetNextSequenceSend(ctx, channelID, 1) - k.EmitCreateChannelEvent(goCtx, channelID) + k.emitCreateChannelEvent(goCtx, channelID, msg.ClientId) return &types.MsgCreateChannelResponse{ChannelId: channelID}, nil } diff --git a/modules/core/04-channel/v2/types/events.go b/modules/core/04-channel/v2/types/events.go index 6166f0422d1..78bf04df189 100644 --- a/modules/core/04-channel/v2/types/events.go +++ b/modules/core/04-channel/v2/types/events.go @@ -9,6 +9,7 @@ import ( // IBC channel events const ( AttributeKeyChannelID = "channel_id" + AttributeKeyClientID = "client_id" ) // IBC channel events vars