Skip to content

Commit

Permalink
refactor(stablecoin): clean up module
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yang committed Jun 28, 2023
1 parent bdd2759 commit 3a77438
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 64 deletions.
49 changes: 0 additions & 49 deletions x/stablecoin/handler.go

This file was deleted.

14 changes: 1 addition & 13 deletions x/stablecoin/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"

"github.com/gorilla/mux"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"

Expand Down Expand Up @@ -48,12 +47,8 @@ func (AppModuleBasic) RegisterInterfaces(interfaceRegistry codectypes.InterfaceR
types.RegisterInterfaces(interfaceRegistry)
}

func (AppModuleBasic) RegisterCodec(aminoCodec *codec.LegacyAmino) {
types.RegisterCodec(aminoCodec)
}

func (AppModuleBasic) RegisterLegacyAminoCodec(aminoCodec *codec.LegacyAmino) {
types.RegisterCodec(aminoCodec)
types.RegisterLegacyAminoCodec(aminoCodec)
}

// DefaultGenesis returns default genesis state as raw bytes for the erc20
Expand All @@ -73,10 +68,6 @@ func (AppModuleBasic) ValidateGenesis(
return genState.Validate()
}

// RegisterRESTRoutes registers the capability module's REST service handlers.
func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {
}

// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module.
func (AppModuleBasic) RegisterGRPCGatewayRoutes(
clientCtx client.Context, mux *runtime.ServeMux,
Expand Down Expand Up @@ -131,9 +122,6 @@ func (am AppModule) Name() string {
return am.AppModuleBasic.Name()
}

// QuerierRoute returns the capability module's query routing key.
func (AppModule) QuerierRoute() string { return types.QuerierRoute }

// RegisterServices registers a GRPC query service to respond to the
// module-specific GRPC queries.
func (am AppModule) RegisterServices(cfg module.Configurator) {
Expand Down
3 changes: 1 addition & 2 deletions x/stablecoin/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/msgservice"
)

func RegisterCodec(cdc *codec.LegacyAmino) {
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgMintStable{}, "stablecoin/MintStable", nil)
cdc.RegisterConcrete(&MsgBurnStable{}, "stablecoin/BurnStable", nil)
}
Expand All @@ -22,6 +22,5 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
}

var (
Amino = codec.NewLegacyAmino()
ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)

0 comments on commit 3a77438

Please sign in to comment.