Skip to content

Commit

Permalink
added msg server for gridnode initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
dekm committed Sep 27, 2023
1 parent 56fb5b6 commit c815566
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 72 deletions.
11 changes: 9 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,6 @@ func New(
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))
govKeeper.SetLegacyRouter(govRouter)

//app.MsgServiceRouter().RegisterService(&gridnodemsgtypes.GridnodeMsg_ServiceDesc, gridnodekeeper.NewMsgServerImpl(*app.GridnodeKeeper))

app.GovKeeper = *govKeeper.SetHooks(
govtypes.NewMultiGovHooks(
// register the governance hooks
Expand Down Expand Up @@ -558,6 +556,12 @@ func New(
app.BankKeeper,
)

// Create an instance of your message service server implementation
msgServer := gridnodekeeper.NewMsgServerImpl(app.GridnodeKeeper)

// Register your service implementation with the gRPC server
gridnodetypes.RegisterGridnodeMsgServer(app.GRPCQueryRouter(), msgServer)

app.CosmosdaemonKeeper = *cosmosdaemonmodulekeeper.NewKeeper(
appCodec,
keys[cosmosdaemonmoduletypes.StoreKey],
Expand Down Expand Up @@ -752,6 +756,8 @@ func New(
app.sm = module.NewSimulationManagerFromAppModules(app.mm.Modules, overrideModules)
app.sm.RegisterStoreDecoders()

app.MsgServiceRouter().RegisterService(&gridnodetypes.GridnodeMsg_ServiceDesc, app.mm.Modules[gridnodetypes.ModuleName])

// initialize stores
app.MountKVStores(keys)
app.MountTransientStores(tkeys)
Expand Down Expand Up @@ -937,6 +943,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(icahosttypes.SubModuleName)
paramsKeeper.Subspace(ugdvestingmoduletypes.ModuleName)
paramsKeeper.Subspace(cosmosdaemonmoduletypes.ModuleName)
paramsKeeper.Subspace(gridnodetypes.ModuleName)
// this line is used by starport scaffolding # stargate/app/paramSubspace

return paramsKeeper
Expand Down
28 changes: 22 additions & 6 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70702,14 +70702,30 @@ definitions:
description: params holds all the parameters of this module.
type: object
description: QueryParamsResponse is response type for the Query/Params RPC method.
cosmossdkgridnode.gridnode.MsgDelegateTokensResponse:
cosmossdkgridnode.gridnode.MsgDelegateResponse:
type: object
description: MsgDelegateResponse defines the Msg/Delegate response type.
cosmossdkgridnode.gridnode.MsgGridnodeDelegateResponse:
type: object
properties:
tx_hash:
type: string
title: Transaction hash of the delegated tokens operation
status:
type: string
title: Status of the operation, e.g., "success" or "failure"
description: >-
MsgDelegateTokensResponse is the response type for the Msg/DelegateTokens
RPC method.


Typically, this might include a transaction hash or other response data.
MsgGridnodeDelegateResponse is the response type for the
Msg/DelegateTokens RPC method.
cosmossdkgridnode.gridnode.MsgGridnodeUndelegateResponse:
type: object
properties:
tx_hash:
type: string
title: Transaction hash of the delegated tokens operation
status:
type: string
title: Status of the operation, e.g., "success" or "failure"
cosmossdkgridnode.gridnode.Params:
type: object
description: Params defines the parameters for the module.
Expand Down
41 changes: 21 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,37 @@ go 1.19
require (
cosmossdk.io/api v0.3.1
github.com/cometbft/cometbft v0.37.2
github.com/cometbft/cometbft-db v0.7.0
github.com/cosmos/cosmos-sdk v0.47.3
github.com/cometbft/cometbft-db v0.8.0
github.com/cosmos/cosmos-sdk v0.47.4
github.com/cosmos/gogoproto v1.4.10
github.com/cosmos/ibc-go/v7 v7.1.0
github.com/cosmos/ibc-go/v7 v7.3.0
github.com/golang/protobuf v1.5.3
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0
github.com/spf13/cast v1.5.1
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.4
github.com/unigrid-project/cosmos-sdk-gridnode v0.0.5
github.com/unigrid-project/cosmos-sdk-gridnode v0.0.47
github.com/unigrid-project/cosmos-sdk-ugdmint v0.0.63
github.com/unigrid-project/cosmos-sdk-unigrid-hedgehog-vesting v0.0.50
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529
google.golang.org/grpc v1.56.2
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d
google.golang.org/grpc v1.58.0
gopkg.in/yaml.v2 v2.4.0
)

require (
cloud.google.com/go v0.110.4 // indirect
cloud.google.com/go/compute v1.20.1 // indirect
cloud.google.com/go v0.110.6 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.0 // indirect
cloud.google.com/go/iam v1.1.1 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
cosmossdk.io/core v0.5.1 // indirect
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
cosmossdk.io/errors v1.0.0 // indirect
cosmossdk.io/log v1.1.0 // indirect
cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca // indirect
cosmossdk.io/math v1.1.2 // indirect
cosmossdk.io/tools/rosetta v0.2.1 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
Expand Down Expand Up @@ -121,6 +121,7 @@ require (
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.10.7 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/linxGnu/grocksdb v1.7.16 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/manifoldco/promptui v0.9.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand Down Expand Up @@ -151,26 +152,26 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tidwall/btree v1.6.0 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/zondax/hid v0.9.1 // indirect
github.com/zondax/ledger-go v0.14.1 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit c815566

Please sign in to comment.