-
Notifications
You must be signed in to change notification settings - Fork 0
/
codec.go
33 lines (28 loc) · 1.06 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
package types
import (
"github.com/mycodeku/transtionhelper/codec"
"github.com/mycodeku/transtionhelper/codec/legacy"
"github.com/mycodeku/transtionhelper/codec/types"
sdk "github.com/mycodeku/transtionhelper/types"
"github.com/mycodeku/transtionhelper/types/msgservice"
"github.com/mycodeku/transtionhelper/x/evidence/exported"
)
// RegisterLegacyAminoCodec registers all the necessary types and interfaces for the
// evidence module.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterInterface((*exported.Evidence)(nil), nil)
legacy.RegisterAminoMsg(cdc, &MsgSubmitEvidence{}, "cosmos-sdk/MsgSubmitEvidence")
cdc.RegisterConcrete(&Equivocation{}, "cosmos-sdk/Equivocation", nil)
}
func RegisterInterfaces(registry types.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSubmitEvidence{})
registry.RegisterInterface(
"cosmos.evidence.v1beta1.Evidence",
(*exported.Evidence)(nil),
&Equivocation{},
)
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}
func init() {
RegisterLegacyAminoCodec(legacy.Cdc)
}