-
Notifications
You must be signed in to change notification settings - Fork 0
/
basic_module.go
41 lines (30 loc) · 1007 Bytes
/
basic_module.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
package basic
import (
"encoding/json"
"github.com/ci123chain/ci123chain/pkg/abci/codec"
codectypes "github.com/ci123chain/ci123chain/pkg/abci/codec/types"
"github.com/ci123chain/ci123chain/pkg/client/context"
"github.com/ci123chain/ci123chain/pkg/pre_staking/types"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
tmtypes "github.com/tendermint/tendermint/types"
)
type AppModuleBasic struct {}
func (am AppModuleBasic) RegisterGRPCGatewayRoutes(context.Context, *runtime.ServeMux) {
}
func (am AppModuleBasic) RegisterCodec(codec *codec.Codec) {
types.RegisterCodec(codec)
}
func (am AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
return
}
func (am AppModuleBasic) DefaultGenesis(validators []tmtypes.GenesisValidator) json.RawMessage {
p := types.DefaultGenesisState(validators)
b, err := types.PreStakingCodec.MarshalJSONIndent(p, "", "")
if err != nil{
panic(err)
}
return b
}
func (am AppModuleBasic) Name() string {
return types.ModuleName
}