Skip to content

Commit

Permalink
refactor(x/authz,x/feegrant): provide updated keeper in depinject (#2…
Browse files Browse the repository at this point in the history
…0590)

(cherry picked from commit aeb1e8f)

# Conflicts:
#	CHANGELOG.md
#	x/authz/module/module.go
#	x/feegrant/module/module.go
  • Loading branch information
julienrbrt authored and mergify[bot] committed Jun 7, 2024
1 parent 7009a2e commit 254f3bd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions x/authz/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

// ____________________________________________________________________________
Expand Down
7 changes: 6 additions & 1 deletion x/feegrant/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 123 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected operand, found '<<'

Check failure on line 123 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / golangci-lint

syntax error: unexpected <<, expecting expression

Check failure on line 123 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / golangci-lint

expected operand, found '<<' (typecheck)

Check failure on line 123 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected <<, expecting expression

Check failure on line 123 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected <<, expecting expression

Check failure on line 123 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected <<, expecting expression

Check failure on line 123 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected <<, expecting expression

Check failure on line 123 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected <<, expecting expression

Check failure on line 123 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected <<, expecting expression

Check failure on line 123 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected <<, expecting expression
AppModuleBasic: AppModuleBasic{cdc: cdc},
keeper: keeper.SetBankKeeper(bk), // Super ugly hack to not be api breaking in v0.50 and v0.47,

Check failure on line 125 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / golangci-lint

syntax error: unexpected : at end of statement

Check failure on line 125 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected : at end of statement

Check failure on line 125 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected : at end of statement

Check failure on line 125 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected : at end of statement

Check failure on line 125 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected : at end of statement

Check failure on line 125 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected : at end of statement

Check failure on line 125 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected : at end of statement

Check failure on line 125 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected : at end of statement
=======
AppModuleBasic: AppModuleBasic{cdc: cdc, ac: ak.AddressCodec()},

Check failure on line 127 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / golangci-lint

syntax error: unexpected comma after top level declaration

Check failure on line 127 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected comma after top level declaration

Check failure on line 127 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected comma after top level declaration

Check failure on line 127 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected comma after top level declaration

Check failure on line 127 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected comma after top level declaration

Check failure on line 127 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected comma after top level declaration
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))

Check failure on line 129 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / dependency-review

illegal character U+0023 '#'

Check failure on line 129 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / golangci-lint

invalid character U+0023 '#' (typecheck)

Check failure on line 129 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / golangci-lint

illegal character U+0023 '#' (typecheck)

Check failure on line 129 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (02)

invalid character U+0023 '#'

Check failure on line 129 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (02)

invalid character U+0023 '#'

Check failure on line 129 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (00)

invalid character U+0023 '#'

Check failure on line 129 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (01)

invalid character U+0023 '#'

Check failure on line 129 in x/feegrant/module/module.go

View workflow job for this annotation

GitHub Actions / tests (01)

invalid character U+0023 '#'
accountKeeper: ak,
bankKeeper: bk,
registry: registry,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 254f3bd

Please sign in to comment.