-
Notifications
You must be signed in to change notification settings - Fork 0
/
proto.go
27 lines (23 loc) · 824 Bytes
/
proto.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//go:build !test_amino
// +build !test_amino
package params
import (
"github.com/blockgenx/blockgen-sdk/codec"
"github.com/blockgenx/blockgen-sdk/codec/types"
"github.com/blockgenx/blockgen-sdk/x/auth/tx"
)
// MakeTestEncodingConfig creates an EncodingConfig for a non-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()
codec := codec.NewProtoCodec(interfaceRegistry)
return EncodingConfig{
InterfaceRegistry: interfaceRegistry,
Codec: codec,
TxConfig: tx.NewTxConfig(codec, tx.DefaultSignModes),
Amino: cdc,
}
}