/
module.go
36 lines (28 loc) · 1.13 KB
/
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
package crisis
import (
"encoding/json"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/crisis"
"github.com/cosmos/cosmos-sdk/x/crisis/types"
customtypes "github.com/classic-terra/core/custom/crisis/types"
core "github.com/classic-terra/core/types"
)
var _ module.AppModuleBasic = AppModuleBasic{}
// AppModuleBasic defines the basic application module used by the distribution module.
type AppModuleBasic struct {
crisis.AppModuleBasic
}
// RegisterLegacyAminoCodec registers the crisis module's types for the given codec.
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
customtypes.RegisterLegacyAminoCodec(cdc)
*types.ModuleCdc = *customtypes.ModuleCdc
}
// DefaultGenesis returns default genesis state as raw bytes for the gov
// module.
func (am AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
// customize to set default genesis state deposit denom to uluna
defaultGenesisState := types.DefaultGenesisState()
defaultGenesisState.ConstantFee.Denom = core.MicroLunaDenom
return cdc.MustMarshalJSON(defaultGenesisState)
}