|
1 | 1 | package app |
2 | 2 |
|
3 | 3 | import ( |
4 | | - "github.com/cosmos/cosmos-sdk/codec" |
5 | | - "github.com/cosmos/cosmos-sdk/codec/types" |
| 4 | + // "github.com/cosmos/cosmos-sdk/codec" |
| 5 | + // "github.com/cosmos/cosmos-sdk/codec/types" |
6 | 6 | "github.com/cosmos/cosmos-sdk/std" |
7 | | - "github.com/cosmos/cosmos-sdk/x/auth/tx" |
| 7 | + // "github.com/cosmos/cosmos-sdk/x/auth/tx" |
| 8 | + evmenc "github.com/zeta-chain/ethermint/encoding" |
| 9 | + ethermint "github.com/zeta-chain/ethermint/types" |
8 | 10 |
|
9 | | - "pushchain/app/params" |
| 11 | + // "pushchain/app/params" |
10 | 12 | ) |
11 | 13 |
|
12 | 14 | // makeEncodingConfig creates an EncodingConfig for an amino based test configuration. |
13 | | -func makeEncodingConfig() params.EncodingConfig { |
14 | | - amino := codec.NewLegacyAmino() |
15 | | - interfaceRegistry := types.NewInterfaceRegistry() |
16 | | - marshaler := codec.NewProtoCodec(interfaceRegistry) |
17 | | - txCfg := tx.NewTxConfig(marshaler, tx.DefaultSignModes) |
| 15 | +// func makeEncodingConfig() params.EncodingConfig { |
| 16 | +// amino := codec.NewLegacyAmino() |
| 17 | +// interfaceRegistry := types.NewInterfaceRegistry() |
| 18 | +// marshaler := codec.NewProtoCodec(interfaceRegistry) |
| 19 | +// txCfg := tx.NewTxConfig(marshaler, tx.DefaultSignModes) |
18 | 20 |
|
19 | | - return params.EncodingConfig{ |
20 | | - InterfaceRegistry: interfaceRegistry, |
21 | | - Marshaler: marshaler, |
22 | | - TxConfig: txCfg, |
23 | | - Amino: amino, |
24 | | - } |
25 | | -} |
| 21 | +// return params.EncodingConfig{ |
| 22 | +// InterfaceRegistry: interfaceRegistry, |
| 23 | +// Marshaler: marshaler, |
| 24 | +// TxConfig: txCfg, |
| 25 | +// Amino: amino, |
| 26 | +// } |
| 27 | +// } |
26 | 28 |
|
27 | 29 | // MakeEncodingConfig creates an EncodingConfig for testing |
28 | | -func MakeEncodingConfig() params.EncodingConfig { |
29 | | - encodingConfig := makeEncodingConfig() |
30 | | - std.RegisterLegacyAminoCodec(encodingConfig.Amino) |
| 30 | +func MakeEncodingConfig() ethermint.EncodingConfig { |
| 31 | + encodingConfig := evmenc.MakeConfig(ModuleBasics) |
| 32 | + // std.RegisterLegacyAminoCodec(encodingConfig.Amino) |
31 | 33 | std.RegisterInterfaces(encodingConfig.InterfaceRegistry) |
32 | | - ModuleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino) |
| 34 | + // ModuleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino) |
33 | 35 | ModuleBasics.RegisterInterfaces(encodingConfig.InterfaceRegistry) |
34 | 36 | return encodingConfig |
35 | 37 | } |
0 commit comments