-
Notifications
You must be signed in to change notification settings - Fork 2
/
codec.go
72 lines (68 loc) · 2.52 KB
/
codec.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
package terra
import (
"github.com/cosmos/cosmos-sdk/codec"
cosmostypes "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
"github.com/frostornge/terra-go/types"
"github.com/terra-project/core/x/auth"
"github.com/terra-project/core/x/auth/vesting"
"github.com/terra-project/core/x/bank"
"github.com/terra-project/core/x/crisis"
"github.com/terra-project/core/x/distribution"
"github.com/terra-project/core/x/evidence"
"github.com/terra-project/core/x/genutil"
"github.com/terra-project/core/x/gov"
"github.com/terra-project/core/x/market"
"github.com/terra-project/core/x/mint"
"github.com/terra-project/core/x/msgauth"
"github.com/terra-project/core/x/oracle"
"github.com/terra-project/core/x/params"
"github.com/terra-project/core/x/slashing"
"github.com/terra-project/core/x/staking"
"github.com/terra-project/core/x/supply"
"github.com/terra-project/core/x/treasury"
treasuryclient "github.com/terra-project/core/x/treasury/client"
"github.com/terra-project/core/x/upgrade"
"github.com/terra-project/core/x/wasm"
)
func MakeCodec() *codec.Codec {
var cdc = codec.New()
cdc.RegisterConcrete(wasm.MsgStoreCode{}, "wasm/MsgStoreCode", nil)
cdc.RegisterConcrete(wasm.MsgInstantiateContract{}, "wasm/MsgInstantiateContract", nil)
cdc.RegisterConcrete(types.MsgExecuteContract{}, "wasm/MsgExecuteContract", nil)
cdc.RegisterConcrete(wasm.MsgMigrateContract{}, "wasm/MsgMigrateContract", nil)
cdc.RegisterConcrete(wasm.MsgUpdateContractOwner{}, "wasm/MsgUpdateContractOwner", nil)
module.NewBasicManager(
genutil.AppModuleBasic{},
auth.AppModuleBasic{},
bank.AppModuleBasic{},
staking.AppModuleBasic{},
mint.AppModuleBasic{},
distribution.AppModuleBasic{},
gov.NewAppModuleBasic(
paramsclient.ProposalHandler,
distrclient.ProposalHandler,
upgradeclient.ProposalHandler,
treasuryclient.TaxRateUpdateProposalHandler,
treasuryclient.RewardWeightUpdateProposalHandler,
),
params.AppModuleBasic{},
crisis.AppModuleBasic{},
slashing.AppModuleBasic{},
supply.AppModuleBasic{},
evidence.AppModuleBasic{},
upgrade.AppModuleBasic{},
oracle.AppModuleBasic{},
market.AppModuleBasic{},
treasury.AppModuleBasic{},
msgauth.AppModuleBasic{},
).RegisterCodec(cdc)
vesting.RegisterCodec(cdc)
cosmostypes.RegisterCodec(cdc)
codec.RegisterCrypto(cdc)
codec.RegisterEvidences(cdc)
return cdc
}