Skip to content

Commit

Permalink
delete grpc gateway (but cannot stop generating it yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Sep 5, 2024
1 parent a5db3b8 commit d1cdfcf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
1 change: 1 addition & 0 deletions scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ cp -r github.com/cosmos/cosmos-sdk/* ./
rm -rf github.com

# UNTIL WE FIGURE OUT ABOUT COSMOSSDK.IO/API, DO NOT GENERATE PULSAR FILES FOR NEW MODULES
# unfortunately, there is no way to do it nicely directly in the buf.gen.pulsar.yaml file (https://github.com/bufbuild/buf/issues/224)
rm -r api/cosmos/bank/v2
rm -r api/cosmos/bank/module/v2

Expand Down
12 changes: 0 additions & 12 deletions x/bank/v2/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,20 @@ import (
"encoding/json"
"fmt"

gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime"
"google.golang.org/grpc"

appmodulev2 "cosmossdk.io/core/appmodule/v2"
"cosmossdk.io/core/registry"
"cosmossdk.io/x/bank/v2/keeper"
"cosmossdk.io/x/bank/v2/types"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/types/module"
)

// ConsensusVersion defines the current x/bank/v2 module consensus version.
const ConsensusVersion = 1

var (
_ module.HasGRPCGateway = AppModule{}

_ appmodulev2.AppModule = AppModule{}
_ appmodulev2.HasGenesis = AppModule{}
_ appmodulev2.HasRegisterInterfaces = AppModule{}
Expand Down Expand Up @@ -53,13 +48,6 @@ func (AppModule) Name() string { return types.ModuleName }
// ConsensusVersion implements HasConsensusVersion
func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion }

// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the bank module.
func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) {
if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil {
panic(err)
}
}

// RegisterInterfaces registers interfaces and implementations of the bank module.
func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) {
types.RegisterInterfaces(registrar)
Expand Down

0 comments on commit d1cdfcf

Please sign in to comment.