Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use message router interface #15213

Merged
merged 3 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#14406](https://github.com/cosmos/cosmos-sdk/issues/14406) Migrate usage of types/store.go to store/types/..
* (x/staking) [#14590](https://github.com/cosmos/cosmos-sdk/pull/14590) Return undelegate amount in MsgUndelegateResponse
* (cli) [#14953](https://github.com/cosmos/cosmos-sdk/pull/14953) Enable profiling block replay during abci handshake with `--cpu-profile`.
* (baseapp) [#15023](https://github.com/cosmos/cosmos-sdk/pull/15023) Add `MessageRouter` interface to baseapp and pass it to authz instead of concrete type.
* (baseapp) [#15023](https://github.com/cosmos/cosmos-sdk/pull/15023) & [#15213](https://github.com/cosmos/cosmos-sdk/pull/15213) Add `MessageRouter` interface to baseapp and pass it to authz, gov and groups instead of concrete type.

### State Machine Breaking

Expand Down
2 changes: 1 addition & 1 deletion x/gov/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (k Keeper) GetAuthority() string {
func NewKeeper(
cdc codec.BinaryCodec, key storetypes.StoreKey, authKeeper types.AccountKeeper,
bankKeeper types.BankKeeper, sk types.StakingKeeper, distrkeeper types.DistributionKeeper,
router *baseapp.MsgServiceRouter, config types.Config, authority string,
router baseapp.MessageRouter, config types.Config, authority string,
) *Keeper {
// ensure governance module account is set
if addr := authKeeper.GetModuleAddress(types.ModuleName); addr == nil {
Expand Down
2 changes: 1 addition & 1 deletion x/gov/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ type GovInputs struct {
Cdc codec.Codec
Key *store.KVStoreKey
ModuleKey depinject.OwnModuleKey
MsgServiceRouter *baseapp.MsgServiceRouter
MsgServiceRouter baseapp.MessageRouter

AccountKeeper govtypes.AccountKeeper
BankKeeper govtypes.BankKeeper
Expand Down
2 changes: 1 addition & 1 deletion x/group/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ type GroupInputs struct {
AccountKeeper group.AccountKeeper
BankKeeper group.BankKeeper
Registry cdctypes.InterfaceRegistry
MsgServiceRouter *baseapp.MsgServiceRouter
MsgServiceRouter baseapp.MessageRouter
}

type GroupOutputs struct {
Expand Down