2020-07-30 11:58:26 -07:00
|
|
|
// +build test_amino
|
2020-07-23 10:31:42 -07:00
|
|
|
|
2020-06-18 13:29:41 -07:00
|
|
|
package params
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
|
|
"github.com/cosmos/cosmos-sdk/codec/types"
|
2021-07-05 07:55:51 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
|
2020-06-18 13:29:41 -07:00
|
|
|
)
|
|
|
|
|
2020-10-27 04:33:48 -07:00
|
|
|
// MakeTestEncodingConfig creates an EncodingConfig for an amino based test configuration.
|
|
|
|
// This function should be used only internally (in the SDK).
|
|
|
|
// App user should'nt create new codecs - use the app.AppCodec instead.
|
|
|
|
// [DEPRECATED]
|
|
|
|
func MakeTestEncodingConfig() EncodingConfig {
|
2020-09-07 07:47:12 -07:00
|
|
|
cdc := codec.NewLegacyAmino()
|
2020-06-18 13:29:41 -07:00
|
|
|
interfaceRegistry := types.NewInterfaceRegistry()
|
2020-08-13 06:20:02 -07:00
|
|
|
marshaler := codec.NewAminoCodec(cdc)
|
2020-06-18 13:29:41 -07:00
|
|
|
|
|
|
|
return EncodingConfig{
|
|
|
|
InterfaceRegistry: interfaceRegistry,
|
|
|
|
Marshaler: marshaler,
|
2020-09-22 07:35:18 -07:00
|
|
|
TxConfig: legacytx.StdTxConfig{Cdc: cdc},
|
2020-06-18 13:29:41 -07:00
|
|
|
Amino: cdc,
|
|
|
|
}
|
|
|
|
}
|