Skip to content

Commit

Permalink
ledger support for cork
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBolten committed Dec 14, 2023
1 parent a867b7f commit fc3b675
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions x/cork/types/codec.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
package types

import (
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/msgservice"
govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
)

// RegisterLegacyAminoCodec registers the vesting interfaces and concrete types on the
// provided LegacyAmino codec. These types are used for Amino JSON serialization
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgScheduleCorkRequest{}, "cork/MsgScheduleCorkRequest", nil)
}

var (
amino = codec.NewLegacyAmino()
// ModuleCdc Note, the codec should ONLY be used in certain instances of tests and for
// JSON encoding as Amino is still used for that purpose.
//
// The actual codec used for serialization should be provided to x/staking and
// defined at the application level.
ModuleCdc = codec.NewAminoCodec(amino)
)

func init() {
RegisterLegacyAminoCodec(amino)
cryptocodec.RegisterCrypto(amino)
amino.Seal()
}

// RegisterInterfaces registers the cork proto files
func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
registry.RegisterImplementations(
Expand Down

0 comments on commit fc3b675

Please sign in to comment.