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"
|
2020-09-22 07:35:18 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx"
|
2020-06-18 13:29:41 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
// MakeEncodingConfig creates an EncodingConfig for an amino based test configuration.
|
|
|
|
func MakeEncodingConfig() 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,
|
|
|
|
}
|
|
|
|
}
|