-
Notifications
You must be signed in to change notification settings - Fork 179
/
module_ibc.go
84 lines (65 loc) · 2.36 KB
/
module_ibc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package staking
import (
"context"
"github.com/okex/exchain/x/staking/keeper"
cosmost "github.com/okex/exchain/libs/cosmos-sdk/store/types"
"github.com/okex/exchain/x/staking/typesadapter"
"github.com/gorilla/mux"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
clictx "github.com/okex/exchain/libs/cosmos-sdk/client/context"
"github.com/okex/exchain/libs/cosmos-sdk/codec"
anytypes "github.com/okex/exchain/libs/cosmos-sdk/codec/types"
"github.com/okex/exchain/libs/cosmos-sdk/types/module"
"github.com/okex/exchain/libs/cosmos-sdk/types/upgrade"
params2 "github.com/okex/exchain/libs/cosmos-sdk/x/params"
"github.com/okex/exchain/x/params"
"github.com/okex/exchain/x/staking/client/rest"
"github.com/okex/exchain/x/staking/types"
_ "github.com/okex/exchain/x/staking/typesadapter"
"github.com/spf13/cobra"
)
var (
_ upgrade.UpgradeModule = AppModule{}
_ module.AppModuleAdapter = AppModule{}
_ module.AppModuleBasicAdapter = AppModuleBasic{}
)
// appmoduleBasic
func (am AppModuleBasic) RegisterRouterForGRPC(cliCtx clictx.CLIContext, r *mux.Router) {
rest.RegisterOriginRPCRoutersForGRPC(cliCtx, r)
}
func (am AppModuleBasic) RegisterInterfaces(registry anytypes.InterfaceRegistry) {}
func (am AppModuleBasic) RegisterGRPCGatewayRoutes(cliContext clictx.CLIContext, serveMux *runtime.ServeMux) {
typesadapter.RegisterQueryHandlerClient(context.Background(), serveMux, typesadapter.NewQueryClient(cliContext))
}
func (am AppModuleBasic) GetTxCmdV2(cdc *codec.CodecProxy, reg anytypes.InterfaceRegistry) *cobra.Command {
return nil
}
func (am AppModuleBasic) GetQueryCmdV2(cdc *codec.CodecProxy, reg anytypes.InterfaceRegistry) *cobra.Command {
return nil
}
/// appmodule
func (am AppModule) RegisterServices(cfg module.Configurator) {
typesadapter.RegisterQueryServer(cfg.QueryServer(), keeper.NewGrpcQuerier(am.keeper))
}
func (am AppModule) RegisterTask() upgrade.HeightTask {
return nil
}
func (am AppModule) UpgradeHeight() int64 {
return -1
}
func (am AppModule) RegisterParam() params.ParamSet {
v := types.KeyHistoricalEntriesParams(7)
return params2.ParamSet(v)
}
func (am AppModule) ModuleName() string {
return ModuleName
}
func (am AppModule) CommitFilter() *cosmost.StoreFilter {
return nil
}
func (am AppModule) PruneFilter() *cosmost.StoreFilter {
return nil
}
func (am AppModule) VersionFilter() *cosmost.VersionFilter {
return nil
}