Skip to content

Commit

Permalink
newer gRPC services
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsingh33 committed Oct 9, 2023
1 parent 90b0c10 commit 48357ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,12 @@ import (
ibchost "github.com/cosmos/ibc-go/v7/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
"github.com/comdex-official/comdex/x/liquidation"
liquidationkeeper "github.com/comdex-official/comdex/x/liquidation/keeper"
liquidationtypes "github.com/comdex-official/comdex/x/liquidation/types"
runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services"

tmdb "github.com/cometbft/cometbft-db"
abcitypes "github.com/cometbft/cometbft/abci/types"
Expand Down Expand Up @@ -1152,6 +1155,14 @@ func New(
app.MountTransientStores(app.tkeys)
app.MountMemoryStores(app.mkeys)

// SDK v47 - since we do not use dep inject, this gives us access to newer gRPC services.
autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.mm.Modules))
reflectionSvc, err := runtimeservices.NewReflectionService()
if err != nil {
panic(err)
}
reflectionv1.RegisterReflectionServiceServer(app.GRPCQueryRouter(), reflectionSvc)

// initialize BaseApp
app.SetInitChainer(app.InitChainer)
app.SetBeginBlocker(app.BeginBlocker)
Expand Down
2 changes: 1 addition & 1 deletion cmd/comdex/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func NewRootCmd() (*cobra.Command, comdex.EncodingConfig) {
WithLegacyAmino(encodingConfig.Amino).
WithInput(os.Stdin).
WithAccountRetriever(authtypes.AccountRetriever{}).
// WithBroadcastMode(flags.FlagBroadcastMode).
WithBroadcastMode(flags.FlagBroadcastMode).
WithHomeDir(comdex.DefaultNodeHome).
WithViper("")

Expand Down

0 comments on commit 48357ed

Please sign in to comment.