2019-06-28 13:11:27 -07:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/supply/exported"
|
|
|
|
)
|
|
|
|
|
|
|
|
// RegisterCodec registers the account types and interface
|
|
|
|
func RegisterCodec(cdc *codec.Codec) {
|
|
|
|
cdc.RegisterInterface((*exported.ModuleAccountI)(nil), nil)
|
2019-08-01 11:56:50 -07:00
|
|
|
cdc.RegisterInterface((*exported.SupplyI)(nil), nil)
|
2019-06-28 13:11:27 -07:00
|
|
|
cdc.RegisterConcrete(&ModuleAccount{}, "cosmos-sdk/ModuleAccount", nil)
|
2019-08-01 11:56:50 -07:00
|
|
|
cdc.RegisterConcrete(&Supply{}, "cosmos-sdk/Supply", nil)
|
2019-06-28 13:11:27 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// ModuleCdc generic sealed codec to be used throughout module
|
|
|
|
var ModuleCdc *codec.Codec
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
cdc := codec.New()
|
|
|
|
RegisterCodec(cdc)
|
|
|
|
codec.RegisterCrypto(cdc)
|
|
|
|
ModuleCdc = cdc.Seal()
|
|
|
|
}
|