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

feat!: remove legacy handler #9650

Merged
merged 16 commits into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add deprecated panic message
  • Loading branch information
aleem1314 committed Jul 14, 2021
commit 1be71c63db285657fee1bc849869dcca5ae8eef7
6 changes: 4 additions & 2 deletions x/auth/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ func (AppModule) Name() string {
// RegisterInvariants performs a no-op.
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// Route returns the message routing key for the auth module.
func (AppModule) Route() sdk.Route { return sdk.Route{} }
// Deprecated: Route returns the message routing key for the auth module.
func (AppModule) Route() sdk.Route {
panic("this method is deprecated and not implemented by the SDK anymore")
}

// QuerierRoute returns the auth module's querier route name.
func (AppModule) QuerierRoute() string {
Expand Down
4 changes: 2 additions & 2 deletions x/auth/vesting/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ func NewAppModule(ak keeper.AccountKeeper, bk types.BankKeeper) AppModule {
// RegisterInvariants performs a no-op; there are no invariants to enforce.
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// Route returns the module's message router and handler.
// Deprecated: Route returns the module's message router and handler.
func (am AppModule) Route() sdk.Route {
return sdk.Route{}
panic("this method is deprecated and not implemented by the SDK anymore")
}

// QuerierRoute returns an empty string as the module contains no query
Expand Down
4 changes: 2 additions & 2 deletions x/authz/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ func (AppModule) Name() string {
// RegisterInvariants does nothing, there are no invariants to enforce
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// Route returns the message routing key for the staking module.
// Deprecated: Route returns the message routing key for the authz module.
func (am AppModule) Route() sdk.Route {
return sdk.NewRoute(authz.RouterKey, nil)
panic("this method is deprecated and not implemented by the SDK anymore")
}

func (am AppModule) NewHandler() sdk.Handler {
Expand Down
4 changes: 2 additions & 2 deletions x/bank/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {
keeper.RegisterInvariants(ir, am.keeper)
}

// Route returns the message routing key for the bank module.
// Deprecated: Route returns the message routing key for the bank module.
func (am AppModule) Route() sdk.Route {
return sdk.Route{}
panic("this method is deprecated and not implemented by the SDK anymore")
}

// QuerierRoute returns the bank module's querier route name.
Expand Down
6 changes: 4 additions & 2 deletions x/capability/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ func (am AppModule) Name() string {
return am.AppModuleBasic.Name()
}

// Route returns the capability module's message routing key.
func (AppModule) Route() sdk.Route { return sdk.Route{} }
// Deprecated: Route returns the capability module's message routing key.
func (AppModule) Route() sdk.Route {
panic("this method is deprecated and not implemented by the SDK anymore")
}

// QuerierRoute returns the capability module's query routing key.
func (AppModule) QuerierRoute() string { return "" }
Expand Down
4 changes: 2 additions & 2 deletions x/crisis/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ func (AppModule) Name() string {
// RegisterInvariants performs a no-op.
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// Route returns the message routing key for the crisis module.
// Deprecated: Route returns the message routing key for the crisis module.
func (am AppModule) Route() sdk.Route {
return sdk.Route{}
panic("this method is deprecated and not implemented by the SDK anymore")
}

// QuerierRoute returns no querier route.
Expand Down
4 changes: 2 additions & 2 deletions x/distribution/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {
keeper.RegisterInvariants(ir, am.keeper)
}

// Route returns the message routing key for the distribution module.
// Deprecated: Route returns the message routing key for the distribution module.
func (am AppModule) Route() sdk.Route {
return sdk.Route{}
panic("this method is deprecated and not implemented by the SDK anymore")
}

// QuerierRoute returns the distribution module's querier route name.
Expand Down
4 changes: 2 additions & 2 deletions x/evidence/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ func (am AppModule) Name() string {
return am.AppModuleBasic.Name()
}

// Route returns the evidence module's message routing key.
// Deprecated: Route returns the evidence module's message routing key.
func (am AppModule) Route() sdk.Route {
return sdk.Route{}
panic("this method is deprecated and not implemented by the SDK anymore")
}

// QuerierRoute returns the evidence module's query routing key.
Expand Down
4 changes: 2 additions & 2 deletions x/feegrant/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ func (AppModule) Name() string {
// RegisterInvariants registers the feegrant module invariants.
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {}

// Route returns the message routing key for the feegrant module.
// Deprecated: Route returns the message routing key for the feegrant module.
func (am AppModule) Route() sdk.Route {
return sdk.NewRoute(feegrant.RouterKey, nil)
panic("this method is deprecated and not implemented by the SDK anymore")
}

// NewHandler returns an sdk.Handler for the feegrant module.
Expand Down
4 changes: 2 additions & 2 deletions x/gov/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {
keeper.RegisterInvariants(ir, am.keeper, am.bankKeeper)
}

// Route returns the message routing key for the gov module.
// Deprecated: Route returns the message routing key for the gov module.
func (am AppModule) Route() sdk.Route {
return sdk.Route{}
panic("this method is deprecated and not implemented by the SDK anymore")
}

// QuerierRoute returns the gov module's querier route name.
Expand Down
6 changes: 4 additions & 2 deletions x/mint/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ func (AppModule) Name() string {
// RegisterInvariants registers the mint module invariants.
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// Route returns the message routing key for the mint module.
func (AppModule) Route() sdk.Route { return sdk.Route{} }
// Deprecated: Route returns the message routing key for the mint module.
func (AppModule) Route() sdk.Route {
panic("this method is deprecated and not implemented by the SDK anymore")
}

// QuerierRoute returns the mint module's querier route name.
func (AppModule) QuerierRoute() string {
Expand Down
5 changes: 4 additions & 1 deletion x/params/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ func (am AppModule) InitGenesis(_ sdk.Context, _ codec.JSONCodec, _ json.RawMess
return []abci.ValidatorUpdate{}
}

func (AppModule) Route() sdk.Route { return sdk.Route{} }
// Deprecated: Route returns the message routing key for the params module.
func (AppModule) Route() sdk.Route {
panic("this method is deprecated and not implemented by the SDK anymore")
}

// GenerateGenesisState performs a no-op.
func (AppModule) GenerateGenesisState(simState *module.SimulationState) {}
Expand Down
4 changes: 2 additions & 2 deletions x/slashing/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ func (AppModule) Name() string {
// RegisterInvariants registers the slashing module invariants.
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// Route returns the message routing key for the slashing module.
// Deprecated: Route returns the message routing key for the slashing module.
func (am AppModule) Route() sdk.Route {
return sdk.Route{}
panic("this method is deprecated and not implemented by the SDK anymore")
}

// QuerierRoute returns the slashing module's querier route name.
Expand Down
4 changes: 2 additions & 2 deletions x/staking/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {
keeper.RegisterInvariants(ir, am.keeper)
}

// Route returns the message routing key for the staking module.
// Deprecated: Route returns the message routing key for the staking module.
func (am AppModule) Route() sdk.Route {
return sdk.Route{}
panic("this method is deprecated and not implemented by the SDK anymore")
}

// QuerierRoute returns the staking module's querier route name.
Expand Down
6 changes: 4 additions & 2 deletions x/upgrade/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ func NewAppModule(keeper keeper.Keeper) AppModule {
// RegisterInvariants does nothing, there are no invariants to enforce
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// Route is empty, as we do not handle Messages (just proposals)
func (AppModule) Route() sdk.Route { return sdk.Route{} }
// Deprecated: Route returns the message routing key for the upgrade module.
func (AppModule) Route() sdk.Route {
panic("this method is deprecated and not implemented by the SDK anymore")
}

// QuerierRoute returns the route we respond to for abci queries
func (AppModule) QuerierRoute() string { return types.QuerierKey }
Expand Down