Skip to content

Commit

Permalink
chore: remove baseapp from x/accounts (#23355)
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler <[email protected]>
  • Loading branch information
Alex | Interchain Labs and technicallyty authored Jan 16, 2025
1 parent 9a27317 commit 952db2b
Show file tree
Hide file tree
Showing 28 changed files with 205 additions and 152 deletions.
5 changes: 4 additions & 1 deletion client/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ require (
pgregory.net/rapid v1.1.0 // indirect
)

replace github.com/cosmos/cosmos-sdk => ./../../
replace (
cosmossdk.io/core/testing => ../../core/testing
github.com/cosmos/cosmos-sdk => ./../../
)

// TODO remove post spinning out all modules
replace (
Expand Down
2 changes: 0 additions & 2 deletions client/v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ cosmossdk.io/collections v1.0.0 h1:YCYIe/pIMtc1iLDD0OrVdfWCnIkpwdy7k9NSQpaR5mg=
cosmossdk.io/collections v1.0.0/go.mod h1:mFfLxnYT1fV+B3Lx9GLap1qxmffIPqQCND4xBExerps=
cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U=
cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc=
cosmossdk.io/core/testing v0.0.1 h1:gYCTaftcRrz+HoNXmK7r9KgbG1jgBJ8pNzm/Pa/erFQ=
cosmossdk.io/core/testing v0.0.1/go.mod h1:2VDNz/25qtxgPa0+j8LW5e8Ev/xObqoJA7QuJS9/wIQ=
cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E=
cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI=
cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0=
Expand Down
16 changes: 14 additions & 2 deletions core/testing/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
module cosmossdk.io/core/testing

go 1.23
go 1.23.1

toolchain go1.23.4

require (
cosmossdk.io/core v1.0.0
github.com/cosmos/gogoproto v1.7.0
github.com/tidwall/btree v1.7.0
go.uber.org/mock v0.5.0
google.golang.org/grpc v1.69.4
)

require cosmossdk.io/schema v1.0.0 // indirect
require (
cosmossdk.io/schema v1.0.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/protobuf v1.35.1 // indirect
)
34 changes: 34 additions & 0 deletions core/testing/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,41 @@ cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U=
cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc=
cosmossdk.io/schema v1.0.0 h1:/diH4XJjpV1JQwuIozwr+A4uFuuwanFdnw2kKeiXwwQ=
cosmossdk.io/schema v1.0.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ=
github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro=
github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI=
github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY=
go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY=
go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE=
go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE=
go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY=
go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk=
go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0=
go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc=
go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8=
go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys=
go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A=
go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU=
go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM=
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A=
google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
50 changes: 50 additions & 0 deletions core/testing/msgrouter/msgrouter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package msgrouter

import (
"context"
"fmt"

gogoproto "github.com/cosmos/gogoproto/proto"

"cosmossdk.io/core/router"
"cosmossdk.io/core/transaction"
)

// msgTypeURL returns the TypeURL of a proto message.
func msgTypeURL(msg gogoproto.Message) string {
return gogoproto.MessageName(msg)
}

type routerHandler func(context.Context, transaction.Msg) (transaction.Msg, error)

var _ router.Service = &RouterService{}

// custom router service for integration tests
type RouterService struct {
handlers map[string]routerHandler
}

func NewRouterService() *RouterService {
return &RouterService{
handlers: make(map[string]routerHandler),
}
}

func (rs *RouterService) RegisterHandler(handler routerHandler, typeUrl string) {
rs.handlers[typeUrl] = handler
}

func (rs RouterService) CanInvoke(ctx context.Context, typeUrl string) error {
if rs.handlers[typeUrl] == nil {
return fmt.Errorf("no handler for typeURL %s", typeUrl)
}
return nil
}

func (rs RouterService) Invoke(ctx context.Context, req transaction.Msg) (transaction.Msg, error) {
typeUrl := msgTypeURL(req)
if rs.handlers[typeUrl] == nil {
return nil, fmt.Errorf("no handler for typeURL %s", typeUrl)
}
return rs.handlers[typeUrl](ctx, req)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,44 @@ import (
"context"
"fmt"

abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
gogogrpc "github.com/cosmos/gogoproto/grpc"
"google.golang.org/grpc"
"google.golang.org/grpc/encoding"

"github.com/cosmos/cosmos-sdk/client/grpc/reflection"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
)

var (
_ gogogrpc.ClientConn = &QueryHelper{}
_ gogogrpc.Server = &QueryHelper{}
)

// GRPCQueryHandler defines a function type which handles mocked ABCI Query requests
// using gRPC
type GRPCQueryHandler = func(ctx context.Context, req *QueryRequest) (*QueryResponse, error)

// QueryRequest is a light mock of cometbft abci.QueryRequest.
type QueryRequest struct {
Data []byte
Height int64
}

// QueryResponse is a light mock of cometbft abci.QueryResponse.
type QueryResponse struct {
Value []byte
Height int64
}

// QueryHelper is a test utility for building a query client from a proto interface registry.
type QueryHelper struct {
cdc encoding.Codec
routes map[string]GRPCQueryHandler
}

func NewQueryHelper(interfaceRegistry codectypes.InterfaceRegistry) *QueryHelper {
// instantiate the codec
cdc := codec.NewProtoCodec(interfaceRegistry).GRPCCodec()
// Once we have an interface registry, we can register the interface
// registry reflection gRPC service.

func NewQueryHelper(cdc encoding.Codec) *QueryHelper {
qh := &QueryHelper{
cdc: cdc,
routes: map[string]GRPCQueryHandler{},
}

reflection.RegisterReflectionServiceServer(qh, reflection.NewReflectionServiceServer(interfaceRegistry))

return qh
}

Expand All @@ -52,7 +56,7 @@ func (q *QueryHelper) Invoke(ctx context.Context, method string, args, reply int
return err
}

res, err := querier(ctx, &abci.QueryRequest{Data: reqBz})
res, err := querier(ctx, &QueryRequest{Data: reqBz})
if err != nil {
return err
}
Expand All @@ -70,10 +74,6 @@ func (q *QueryHelper) NewStream(context.Context, *grpc.StreamDesc, string, ...gr
panic("not implemented")
}

// GRPCQueryHandler defines a function type which handles ABCI Query requests
// using gRPC
type GRPCQueryHandler = func(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error)

// Route returns the GRPCQueryHandler for a given query route path or nil
// if not found
func (q *QueryHelper) Route(path string) GRPCQueryHandler {
Expand Down Expand Up @@ -105,7 +105,7 @@ func (q *QueryHelper) registerABCIQueryHandler(sd *grpc.ServiceDesc, method grpc
panic(fmt.Sprintf("handler for %s already registered", fqName))
}

q.routes[fqName] = func(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) {
q.routes[fqName] = func(ctx context.Context, req *QueryRequest) (*QueryResponse, error) {
// call the method handler from the service description with the handler object,
// a wrapped sdk.Context with proto-unmarshaled data from the ABCI request data
res, err := methodHandler(handler, ctx, func(i interface{}) error {
Expand All @@ -123,7 +123,7 @@ func (q *QueryHelper) registerABCIQueryHandler(sd *grpc.ServiceDesc, method grpc
}

// return the result bytes as the response value
return &abci.QueryResponse{
return &QueryResponse{
Height: req.Height,
Value: resBytes,
}, nil
Expand Down
2 changes: 2 additions & 0 deletions simapp/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,13 @@ replace (

// server v2 integration
replace (
cosmossdk.io/core/testing => ../../core/testing
cosmossdk.io/indexer/postgres => ../../indexer/postgres
cosmossdk.io/runtime/v2 => ../../runtime/v2
cosmossdk.io/server/v2 => ../../server/v2
cosmossdk.io/server/v2/appmanager => ../../server/v2/appmanager
cosmossdk.io/server/v2/cometbft => ../../server/v2/cometbft
cosmossdk.io/server/v2/stf => ../../server/v2/stf
cosmossdk.io/store/v2 => ../../store/v2

)
2 changes: 0 additions & 2 deletions simapp/v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,6 @@ cosmossdk.io/collections v1.0.0 h1:YCYIe/pIMtc1iLDD0OrVdfWCnIkpwdy7k9NSQpaR5mg=
cosmossdk.io/collections v1.0.0/go.mod h1:mFfLxnYT1fV+B3Lx9GLap1qxmffIPqQCND4xBExerps=
cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U=
cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc=
cosmossdk.io/core/testing v0.0.1 h1:gYCTaftcRrz+HoNXmK7r9KgbG1jgBJ8pNzm/Pa/erFQ=
cosmossdk.io/core/testing v0.0.1/go.mod h1:2VDNz/25qtxgPa0+j8LW5e8Ev/xObqoJA7QuJS9/wIQ=
cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E=
cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI=
cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0=
Expand Down
3 changes: 2 additions & 1 deletion tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
cosmossdk.io/api v0.8.2-0.20250114014050-e279d7cec391
cosmossdk.io/collections v1.0.0
cosmossdk.io/core v1.0.0
cosmossdk.io/core/testing v0.0.1
cosmossdk.io/depinject v1.1.0
cosmossdk.io/log v1.5.0
cosmossdk.io/math v1.5.0
Expand All @@ -24,7 +25,6 @@ require (
)

require (
cosmossdk.io/core/testing v0.0.1
cosmossdk.io/runtime/v2 v2.0.0-20240911143651-72620a577660
cosmossdk.io/server/v2/stf v1.0.0-beta.2
cosmossdk.io/store/v2 v2.0.0-beta.1
Expand Down Expand Up @@ -270,6 +270,7 @@ replace (

// Below are the long-lived replace for tests.
replace (
cosmossdk.io/core/testing => ../core/testing
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
// We always want to test against the latest version of the SDK.
github.com/cosmos/cosmos-sdk => ../.
Expand Down
2 changes: 0 additions & 2 deletions tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,6 @@ cosmossdk.io/collections v1.0.0 h1:YCYIe/pIMtc1iLDD0OrVdfWCnIkpwdy7k9NSQpaR5mg=
cosmossdk.io/collections v1.0.0/go.mod h1:mFfLxnYT1fV+B3Lx9GLap1qxmffIPqQCND4xBExerps=
cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U=
cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc=
cosmossdk.io/core/testing v0.0.1 h1:gYCTaftcRrz+HoNXmK7r9KgbG1jgBJ8pNzm/Pa/erFQ=
cosmossdk.io/core/testing v0.0.1/go.mod h1:2VDNz/25qtxgPa0+j8LW5e8Ev/xObqoJA7QuJS9/wIQ=
cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E=
cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI=
cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0=
Expand Down
9 changes: 5 additions & 4 deletions tests/integration/v2/accounts/fixture_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/stretchr/testify/require"

"cosmossdk.io/core/router"
"cosmossdk.io/core/testing/msgrouter"
"cosmossdk.io/core/transaction"
"cosmossdk.io/depinject"
"cosmossdk.io/log"
Expand Down Expand Up @@ -144,14 +145,14 @@ func initFixture(t *testing.T, f authentiacteFunc) *fixture {
var err error
startupCfg := integration.DefaultStartUpConfig(t)

msgRouterService := integration.NewRouterService()
msgRouterService := msgrouter.NewRouterService()
fixture.registerMsgRouterService(msgRouterService)

var routerFactory runtime.RouterServiceFactory = func(_ []byte) router.Service {
return msgRouterService
}

queryRouterService := integration.NewRouterService()
queryRouterService := msgrouter.NewRouterService()
fixture.registerQueryRouterService(queryRouterService)

serviceBuilder := runtime.NewRouterBuilder(routerFactory, queryRouterService)
Expand Down Expand Up @@ -188,7 +189,7 @@ func initFixture(t *testing.T, f authentiacteFunc) *fixture {
return fixture
}

func (f *fixture) registerMsgRouterService(router *integration.RouterService) {
func (f *fixture) registerMsgRouterService(router *msgrouter.RouterService) {
// register custom router service
bankSendHandler := func(ctx context.Context, req transaction.Msg) (transaction.Msg, error) {
msg, ok := req.(*banktypes.MsgSend)
Expand All @@ -203,7 +204,7 @@ func (f *fixture) registerMsgRouterService(router *integration.RouterService) {
router.RegisterHandler(bankSendHandler, "cosmos.bank.v1beta1.MsgSend")
}

func (f *fixture) registerQueryRouterService(router *integration.RouterService) {
func (f *fixture) registerQueryRouterService(router *msgrouter.RouterService) {
// register custom router service
queryHandler := func(ctx context.Context, msg transaction.Msg) (transaction.Msg, error) {
req, ok := msg.(*accountsv1.AccountNumberRequest)
Expand Down
9 changes: 5 additions & 4 deletions tests/integration/v2/accounts/lockup/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/stretchr/testify/suite"

"cosmossdk.io/core/router"
"cosmossdk.io/core/testing/msgrouter"
"cosmossdk.io/core/transaction"
"cosmossdk.io/depinject"
"cosmossdk.io/log"
Expand Down Expand Up @@ -78,14 +79,14 @@ func (s *IntegrationTestSuite) SetupSuite() {
var err error
startupCfg := integration.DefaultStartUpConfig(s.T())

msgRouterService := integration.NewRouterService()
msgRouterService := msgrouter.NewRouterService()
s.registerMsgRouterService(msgRouterService)

var routerFactory runtime.RouterServiceFactory = func(_ []byte) router.Service {
return msgRouterService
}

queryRouterService := integration.NewRouterService()
queryRouterService := msgrouter.NewRouterService()
s.registerQueryRouterService(queryRouterService)

serviceBuilder := runtime.NewRouterBuilder(routerFactory, queryRouterService)
Expand Down Expand Up @@ -113,7 +114,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
s.ctx = s.app.StateLatestContext(s.T())
}

func (s *IntegrationTestSuite) registerMsgRouterService(router *integration.RouterService) {
func (s *IntegrationTestSuite) registerMsgRouterService(router *msgrouter.RouterService) {
// register custom router service
bankSendHandler := func(ctx context.Context, req transaction.Msg) (transaction.Msg, error) {
msg, ok := req.(*banktypes.MsgSend)
Expand Down Expand Up @@ -161,7 +162,7 @@ func (s *IntegrationTestSuite) registerMsgRouterService(router *integration.Rout
router.RegisterHandler(distrWithdrawRewardHandler, "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward")
}

func (s *IntegrationTestSuite) registerQueryRouterService(router *integration.RouterService) {
func (s *IntegrationTestSuite) registerQueryRouterService(router *msgrouter.RouterService) {
// register custom router service
stakingParamsQueryHandler := func(ctx context.Context, msg transaction.Msg) (transaction.Msg, error) {
req, ok := msg.(*stakingtypes.QueryParamsRequest)
Expand Down
Loading

0 comments on commit 952db2b

Please sign in to comment.