-
Notifications
You must be signed in to change notification settings - Fork 17
/
codec.go
67 lines (61 loc) · 1.91 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
package types
import (
"github.com/cosmos/cosmos-sdk/codec"
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/msgservice"
)
func RegisterCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgRegister{}, "rns/Register", nil)
cdc.RegisterConcrete(&MsgBid{}, "rns/Bid", nil)
cdc.RegisterConcrete(&MsgAcceptBid{}, "rns/AcceptBid", nil)
cdc.RegisterConcrete(&MsgCancelBid{}, "rns/CancelBid", nil)
cdc.RegisterConcrete(&MsgList{}, "rns/List", nil)
cdc.RegisterConcrete(&MsgBuy{}, "rns/Buy", nil)
cdc.RegisterConcrete(&MsgDelist{}, "rns/Delist", nil)
cdc.RegisterConcrete(&MsgTransfer{}, "rns/Transfer", nil)
cdc.RegisterConcrete(&MsgAddRecord{}, "rns/AddRecord", nil)
cdc.RegisterConcrete(&MsgDelRecord{}, "rns/DelRecord", nil)
cdc.RegisterConcrete(&MsgInit{}, "rns/Init", nil)
}
func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgRegister{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgBid{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgAcceptBid{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgCancelBid{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgList{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgBuy{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgDelist{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgTransfer{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgAddRecord{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgDelRecord{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgInit{},
)
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}
var (
Amino = codec.NewLegacyAmino()
ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)