-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
011eabd
commit a151dbc
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package app | ||
|
||
import ( | ||
amino "github.com/cosmos/cosmos-sdk/codec" | ||
"github.com/cosmos/cosmos-sdk/codec/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
"github.com/cosmos/cosmos-sdk/x/auth/tx" | ||
|
||
"github.com/artela-network/artela-rollkit/app/params" | ||
) | ||
|
||
// MakeConfig creates an EncodingConfig for testing | ||
func MakeConfig(mb module.BasicManager) params.EncodingConfig { | ||
cdc := amino.NewLegacyAmino() | ||
interfaceRegistry := types.NewInterfaceRegistry() | ||
codec := amino.NewProtoCodec(interfaceRegistry) | ||
|
||
encodingConfig := params.EncodingConfig{ | ||
InterfaceRegistry: interfaceRegistry, | ||
Marshaler: codec, | ||
TxConfig: tx.NewTxConfig(codec, tx.DefaultSignModes), | ||
Amino: cdc, | ||
} | ||
|
||
RegisterLegacyAminoCodec(encodingConfig.Amino) | ||
mb.RegisterLegacyAminoCodec(encodingConfig.Amino) | ||
RegisterInterfaces(encodingConfig.InterfaceRegistry) | ||
mb.RegisterInterfaces(encodingConfig.InterfaceRegistry) | ||
return encodingConfig | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters