From 54afcbc6b919dad604ed16de23772e851ad0c51e Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Mon, 30 Sep 2024 16:44:16 +0900 Subject: [PATCH] fix to use `GetIBCModuleByChannel` instead of `GetIBCModuleByPort` Signed-off-by: Jun Kimura --- pkg/relay/ethereum/cmd.go | 1 + pkg/relay/ethereum/upgrade.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/relay/ethereum/cmd.go b/pkg/relay/ethereum/cmd.go index ba5141d..0668211 100644 --- a/pkg/relay/ethereum/cmd.go +++ b/pkg/relay/ethereum/cmd.go @@ -216,6 +216,7 @@ func proposeAppVersionCmd(ctx *config.Context) *cobra.Command { return ethChain.ProposeAppVersion( cmd.Context(), ethChain.pathEnd.PortID, + ethChain.pathEnd.ChannelID, version, implementation, initialCalldata, diff --git a/pkg/relay/ethereum/upgrade.go b/pkg/relay/ethereum/upgrade.go index 417ff7e..4b33487 100644 --- a/pkg/relay/ethereum/upgrade.go +++ b/pkg/relay/ethereum/upgrade.go @@ -103,6 +103,7 @@ func (c *Chain) AllowTransitionToFlushComplete( func (c *Chain) ProposeAppVersion( ctx context.Context, portID string, + channelID string, version string, implementation common.Address, initialCalldata []byte, @@ -110,12 +111,13 @@ func (c *Chain) ProposeAppVersion( logger := c.GetChainLogger() logger = &log.RelayLogger{Logger: logger.With( logAttrPortID, portID, + logAttrChannelID, channelID, logAttrVersion, version, logAttrImplementation, implementation.Hex(), logAttrInitialCalldata, hex.EncodeToString(initialCalldata), )} - appAddr, err := c.ibcHandler.GetIBCModuleByPort(c.CallOpts(ctx, 0), portID) + appAddr, err := c.ibcHandler.GetIBCModuleByChannel(c.CallOpts(ctx, 0), portID, channelID) if err != nil { return err }