update fork
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/cosmos/cosmos-sdk/std"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
cryptocodec "github.com/cerc-io/laconicd/crypto/codec"
|
||||
ethermint "github.com/cerc-io/laconicd/types"
|
||||
@@ -11,7 +12,9 @@ import (
|
||||
|
||||
// RegisterLegacyAminoCodec registers Interfaces from types, crypto, and SDK std.
|
||||
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
|
||||
std.RegisterLegacyAminoCodec(cdc)
|
||||
sdk.RegisterLegacyAminoCodec(cdc)
|
||||
cryptocodec.RegisterCrypto(cdc)
|
||||
codec.RegisterEvidences(cdc)
|
||||
}
|
||||
|
||||
// RegisterInterfaces registers Interfaces from types, crypto, and SDK std.
|
||||
|
||||
+6
-7
@@ -1,7 +1,7 @@
|
||||
package encoding
|
||||
|
||||
import (
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
amino "github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/cosmos/cosmos-sdk/simapp/params"
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
@@ -12,16 +12,15 @@ import (
|
||||
|
||||
// MakeConfig creates an EncodingConfig for testing
|
||||
func MakeConfig(mb module.BasicManager) params.EncodingConfig {
|
||||
amino := codec.NewLegacyAmino()
|
||||
cdc := amino.NewLegacyAmino()
|
||||
interfaceRegistry := types.NewInterfaceRegistry()
|
||||
marshaler := codec.NewProtoCodec(interfaceRegistry)
|
||||
txCfg := tx.NewTxConfig(marshaler, tx.DefaultSignModes)
|
||||
codec := amino.NewProtoCodec(interfaceRegistry)
|
||||
|
||||
encodingConfig := params.EncodingConfig{
|
||||
InterfaceRegistry: interfaceRegistry,
|
||||
Codec: marshaler,
|
||||
TxConfig: txCfg,
|
||||
Amino: amino,
|
||||
Codec: codec,
|
||||
TxConfig: tx.NewTxConfig(codec, tx.DefaultSignModes),
|
||||
Amino: cdc,
|
||||
}
|
||||
|
||||
enccodec.RegisterLegacyAminoCodec(encodingConfig.Amino)
|
||||
|
||||
Reference in New Issue
Block a user