From 254f3bd4b99a041c20d8788129b2cf740d6c147e Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 7 Jun 2024 14:34:02 +0200 Subject: [PATCH 1/2] refactor(x/authz,x/feegrant): provide updated keeper in depinject (#20590) (cherry picked from commit aeb1e8f46b8dad727e1935ac7728fb0c0327f280) # Conflicts: # CHANGELOG.md # x/authz/module/module.go # x/feegrant/module/module.go --- CHANGELOG.md | 15 +++++++++++++++ x/authz/module/module.go | 4 ++++ x/feegrant/module/module.go | 7 ++++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7791411be3f5..73d698b41d3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,7 +37,22 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +<<<<<<< HEAD ## [v0.47.11](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.11) - 2024-04-22 +======= +## Improvements + +* (x/authz,x/feegrant) [#20590](https://github.com/cosmos/cosmos-sdk/pull/20590) Provide updated keeper in depinject for authz and feegrant modules. + +## [v0.50.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.7) - 2024-06-04 + +### Improvements + +* (debug) [#20328](https://github.com/cosmos/cosmos-sdk/pull/20328) Add consensus address for debug cmd. +* (runtime) [#20264](https://github.com/cosmos/cosmos-sdk/pull/20264) Expose grpc query router via depinject. +* (x/consensus) [#20381](https://github.com/cosmos/cosmos-sdk/pull/20381) Use Comet utility for consensus module consensus param updates. +* (client) [#20356](https://github.com/cosmos/cosmos-sdk/pull/20356) Overwrite client context when available in `SetCmdClientContext`. +>>>>>>> aeb1e8f46 (refactor(x/authz,x/feegrant): provide updated keeper in depinject (#20590)) ### Bug Fixes diff --git a/x/authz/module/module.go b/x/authz/module/module.go index 50c91ddc4269..760ac53ce0c7 100644 --- a/x/authz/module/module.go +++ b/x/authz/module/module.go @@ -192,7 +192,11 @@ type AuthzOutputs struct { func ProvideModule(in AuthzInputs) AuthzOutputs { k := keeper.NewKeeper(in.Key, in.Cdc, in.MsgServiceRouter, in.AccountKeeper) m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.BankKeeper, in.Registry) +<<<<<<< HEAD return AuthzOutputs{AuthzKeeper: k, Module: m} +======= + return ModuleOutputs{AuthzKeeper: k.SetBankKeeper(in.BankKeeper) /* depinject ux improvement */, Module: m} +>>>>>>> aeb1e8f46 (refactor(x/authz,x/feegrant): provide updated keeper in depinject (#20590)) } // ____________________________________________________________________________ diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index 454f9a8f5291..b4efee96c1a8 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -120,8 +120,13 @@ type AppModule struct { // NewAppModule creates a new AppModule object func NewAppModule(cdc codec.Codec, ak feegrant.AccountKeeper, bk feegrant.BankKeeper, keeper keeper.Keeper, registry cdctypes.InterfaceRegistry) AppModule { return AppModule{ +<<<<<<< HEAD AppModuleBasic: AppModuleBasic{cdc: cdc}, keeper: keeper.SetBankKeeper(bk), // Super ugly hack to not be api breaking in v0.50 and v0.47, +======= + AppModuleBasic: AppModuleBasic{cdc: cdc, ac: ak.AddressCodec()}, + keeper: keeper.SetBankKeeper(bk), // Super ugly hack to not be api breaking in v0.50 and v0.47 +>>>>>>> aeb1e8f46 (refactor(x/authz,x/feegrant): provide updated keeper in depinject (#20590)) accountKeeper: ak, bankKeeper: bk, registry: registry, @@ -197,7 +202,7 @@ type FeegrantInputs struct { func ProvideModule(in FeegrantInputs) (keeper.Keeper, appmodule.AppModule) { k := keeper.NewKeeper(in.Cdc, in.Key, in.AccountKeeper) m := NewAppModule(in.Cdc, in.AccountKeeper, in.BankKeeper, k, in.Registry) - return k, m + return k.SetBankKeeper(in.BankKeeper) /* depinject ux improvement */, m } // AppModuleSimulation functions From 60b9e6380bfa90090544feb29b81ecfd69d2f3b2 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 7 Jun 2024 16:34:31 +0200 Subject: [PATCH 2/2] conflicts --- CHANGELOG.md | 13 +------------ x/authz/module/module.go | 6 +----- x/feegrant/module/module.go | 5 ----- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73d698b41d3c..cc0f3029ed20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,22 +37,11 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] -<<<<<<< HEAD -## [v0.47.11](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.11) - 2024-04-22 -======= ## Improvements * (x/authz,x/feegrant) [#20590](https://github.com/cosmos/cosmos-sdk/pull/20590) Provide updated keeper in depinject for authz and feegrant modules. -## [v0.50.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.7) - 2024-06-04 - -### Improvements - -* (debug) [#20328](https://github.com/cosmos/cosmos-sdk/pull/20328) Add consensus address for debug cmd. -* (runtime) [#20264](https://github.com/cosmos/cosmos-sdk/pull/20264) Expose grpc query router via depinject. -* (x/consensus) [#20381](https://github.com/cosmos/cosmos-sdk/pull/20381) Use Comet utility for consensus module consensus param updates. -* (client) [#20356](https://github.com/cosmos/cosmos-sdk/pull/20356) Overwrite client context when available in `SetCmdClientContext`. ->>>>>>> aeb1e8f46 (refactor(x/authz,x/feegrant): provide updated keeper in depinject (#20590)) +## [v0.47.11](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.11) - 2024-04-22 ### Bug Fixes diff --git a/x/authz/module/module.go b/x/authz/module/module.go index 760ac53ce0c7..c75fdc9bd080 100644 --- a/x/authz/module/module.go +++ b/x/authz/module/module.go @@ -192,11 +192,7 @@ type AuthzOutputs struct { func ProvideModule(in AuthzInputs) AuthzOutputs { k := keeper.NewKeeper(in.Key, in.Cdc, in.MsgServiceRouter, in.AccountKeeper) m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.BankKeeper, in.Registry) -<<<<<<< HEAD - return AuthzOutputs{AuthzKeeper: k, Module: m} -======= - return ModuleOutputs{AuthzKeeper: k.SetBankKeeper(in.BankKeeper) /* depinject ux improvement */, Module: m} ->>>>>>> aeb1e8f46 (refactor(x/authz,x/feegrant): provide updated keeper in depinject (#20590)) + return AuthzOutputs{AuthzKeeper: k.SetBankKeeper(in.BankKeeper) /* depinject ux improvement */, Module: m} } // ____________________________________________________________________________ diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index b4efee96c1a8..00038054d462 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -120,13 +120,8 @@ type AppModule struct { // NewAppModule creates a new AppModule object func NewAppModule(cdc codec.Codec, ak feegrant.AccountKeeper, bk feegrant.BankKeeper, keeper keeper.Keeper, registry cdctypes.InterfaceRegistry) AppModule { return AppModule{ -<<<<<<< HEAD AppModuleBasic: AppModuleBasic{cdc: cdc}, - keeper: keeper.SetBankKeeper(bk), // Super ugly hack to not be api breaking in v0.50 and v0.47, -======= - AppModuleBasic: AppModuleBasic{cdc: cdc, ac: ak.AddressCodec()}, keeper: keeper.SetBankKeeper(bk), // Super ugly hack to not be api breaking in v0.50 and v0.47 ->>>>>>> aeb1e8f46 (refactor(x/authz,x/feegrant): provide updated keeper in depinject (#20590)) accountKeeper: ak, bankKeeper: bk, registry: registry,