2018-06-26 19:00:12 -07:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
2018-09-13 11:17:32 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
2018-06-26 19:00:12 -07:00
|
|
|
)
|
|
|
|
|
2018-09-13 11:17:32 -07:00
|
|
|
// Register concrete types on codec codec
|
|
|
|
func RegisterCodec(cdc *codec.Codec) {
|
2018-06-26 19:00:12 -07:00
|
|
|
cdc.RegisterConcrete(MsgCreateValidator{}, "cosmos-sdk/MsgCreateValidator", nil)
|
|
|
|
cdc.RegisterConcrete(MsgEditValidator{}, "cosmos-sdk/MsgEditValidator", nil)
|
|
|
|
cdc.RegisterConcrete(MsgDelegate{}, "cosmos-sdk/MsgDelegate", nil)
|
|
|
|
cdc.RegisterConcrete(MsgBeginUnbonding{}, "cosmos-sdk/BeginUnbonding", nil)
|
|
|
|
cdc.RegisterConcrete(MsgBeginRedelegate{}, "cosmos-sdk/BeginRedelegate", nil)
|
|
|
|
}
|
|
|
|
|
|
|
|
// generic sealed codec to be used throughout sdk
|
2018-09-13 11:17:32 -07:00
|
|
|
var MsgCdc *codec.Codec
|
2018-06-26 19:00:12 -07:00
|
|
|
|
|
|
|
func init() {
|
2018-09-13 11:17:32 -07:00
|
|
|
cdc := codec.New()
|
|
|
|
RegisterCodec(cdc)
|
|
|
|
codec.RegisterCrypto(cdc)
|
2018-09-24 21:09:31 -07:00
|
|
|
MsgCdc = cdc.Seal()
|
2018-06-26 19:00:12 -07:00
|
|
|
}
|