24 lines
609 B
Go
24 lines
609 B
Go
// +build test_amino
|
|
|
|
package params
|
|
|
|
import (
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
"github.com/cosmos/cosmos-sdk/codec/types"
|
|
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
|
)
|
|
|
|
// MakeEncodingConfig creates an EncodingConfig for an amino based test configuration.
|
|
func MakeEncodingConfig() EncodingConfig {
|
|
cdc := codec.New()
|
|
interfaceRegistry := types.NewInterfaceRegistry()
|
|
marshaler := codec.NewAminoCodec(cdc)
|
|
|
|
return EncodingConfig{
|
|
InterfaceRegistry: interfaceRegistry,
|
|
Marshaler: marshaler,
|
|
TxConfig: authtypes.StdTxConfig{Cdc: cdc},
|
|
Amino: cdc,
|
|
}
|
|
}
|