cosmos-sdk/simapp/params/amino.go
Jacob Gadikian 55054282d2
chore: gofumpt (#11839)
* fumpt using main not master...

* be more descriptive

* fumpt

* fix nits

Co-authored-by: Julien Robert <julien@rbrt.fr>
2022-05-19 10:55:27 +02:00

28 lines
803 B
Go

//go:build test_amino
// +build test_amino
package params
import (
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
)
// 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 {
cdc := codec.NewLegacyAmino()
interfaceRegistry := types.NewInterfaceRegistry()
marshaler := codec.NewAminoCodec(cdc)
return EncodingConfig{
InterfaceRegistry: interfaceRegistry,
Marshaler: marshaler,
TxConfig: legacytx.StdTxConfig{Cdc: cdc},
Amino: cdc,
}
}