* Remove HybridCodec * WIP on fixing proto JSON issues * WIP on fixing proto JSON issues * WIP on fixing proto JSON issues * WIP on fixing proto JSON issues * WIP on fixing proto JSON issues * Test fixes * Delete hybrid_codec.go * Fixes * Fixes * Fixes * Test fixes * Test fixes * Test fixes * Lint * Sim fixes * Sim fixes * Revert * Remove vesting account JSON tests * Update CHANGELOG.md * Lint * Sim fixes * Sim fixes * Docs * Migrate more amino usages * Remove custom VoteOption String() and json marshaling * Fix tests * Add comments, update CHANGELOG.md Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com> Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
26 lines
711 B
Go
26 lines
711 B
Go
// +build !test_amino
|
|
|
|
package params
|
|
|
|
import (
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
"github.com/cosmos/cosmos-sdk/codec/types"
|
|
"github.com/cosmos/cosmos-sdk/std"
|
|
"github.com/cosmos/cosmos-sdk/x/auth/tx"
|
|
)
|
|
|
|
// MakeEncodingConfig creates an EncodingConfig for an amino based test configuration.
|
|
func MakeEncodingConfig() EncodingConfig {
|
|
amino := codec.New()
|
|
interfaceRegistry := types.NewInterfaceRegistry()
|
|
marshaler := codec.NewProtoCodec(interfaceRegistry)
|
|
txCfg := tx.NewTxConfig(marshaler, std.DefaultPublicKeyCodec{}, tx.DefaultSignModes)
|
|
|
|
return EncodingConfig{
|
|
InterfaceRegistry: interfaceRegistry,
|
|
Marshaler: marshaler,
|
|
TxConfig: txCfg,
|
|
Amino: amino,
|
|
}
|
|
}
|