From e040827e6d4700db3f3ff7377ab9cb7a9f66512b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 19 Dec 2022 23:17:41 -0800 Subject: [PATCH] fix(app): intertx not using initialized controller (backport #1701) (#1702) Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com> --- app/app.go | 12 ++++++------ x/intertx/client/query.go | 2 +- x/intertx/client/tx.go | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/app.go b/app/app.go index 1ead01f13f..d014af2f2f 100644 --- a/app/app.go +++ b/app/app.go @@ -386,12 +386,6 @@ func NewRegenApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest app.ScopedIBCTransferKeeper, ) - app.InterTxKeeper = intertxkeeper.NewKeeper( - appCodec, - app.ICAControllerKeeper, - app.ScopedInterTxKeeper, - ) - app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper( appCodec, keys[icacontrollertypes.StoreKey], @@ -415,6 +409,12 @@ func NewRegenApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest app.MsgServiceRouter(), ) + app.InterTxKeeper = intertxkeeper.NewKeeper( + appCodec, + app.ICAControllerKeeper, + app.ScopedInterTxKeeper, + ) + // Create IBC stacks to add to IBC router ibcTransferModule := ibctransfer.NewIBCModule(app.IBCTransferKeeper) ibcTransferStack := ibcfee.NewIBCMiddleware(ibcTransferModule, app.IBCFeeKeeper) diff --git a/x/intertx/client/query.go b/x/intertx/client/query.go index c894221d57..ef8342ebcd 100644 --- a/x/intertx/client/query.go +++ b/x/intertx/client/query.go @@ -30,7 +30,7 @@ func getInterchainAccountCmd() *cobra.Command { Use: "ica [owner-account] [connection-id]", Short: "query the interchain account address", Long: "query the interchain account address associated with the owner address and connection id.", - Example: "regen q intertx ica regen1drn830y2l24pne08t7k7p7z6zms3x8p8zc3u0h channel-5", + Example: "regen q intertx ica regen1drn830y2l24pne08t7k7p7z6zms3x8p8zc3u0h connection-0", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) diff --git a/x/intertx/client/tx.go b/x/intertx/client/tx.go index 147343ce62..4af64a2cce 100644 --- a/x/intertx/client/tx.go +++ b/x/intertx/client/tx.go @@ -49,8 +49,8 @@ func getRegisterAccountCmd() *cobra.Command { Short: "register an interchain account", Long: "register an interchain account for the chain corresponding to the connection-id.", Example: ` - regen tx intertx register --connection-id channel-10 - regen tx intertx register --connection-id channel-10 --version '{"version":"ics27-1","tx_type":"sdk_multi_msg","encoding":"proto3","host_connection_id":"connection-0","controller_connection_id":"connection-0","address":"regen14zs2x38lmkw4eqvl3lpml5l8crzaxn6mpvh79z"}' + regen tx intertx register --connection-id connection-0 + regen tx intertx register --connection-id connection-0 --version '{"version":"ics27-1","tx_type":"sdk_multi_msg","encoding":"proto3","host_connection_id":"connection-0","controller_connection_id":"connection-0","address":"regen14zs2x38lmkw4eqvl3lpml5l8crzaxn6mpvh79z"}' `, RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd)