Override auth module codec for all references to Ethermint codec (#103)

This commit is contained in:
Austin Abell
2019-09-18 14:50:06 -04:00
committed by GitHub
parent 6c72a79035
commit 69567e29d5
4 changed files with 11 additions and 112 deletions
+10 -3
View File
@@ -12,6 +12,7 @@ import (
sdkrpc "github.com/cosmos/cosmos-sdk/client/rpc"
sdk "github.com/cosmos/cosmos-sdk/types"
emintkeys "github.com/cosmos/ethermint/keys"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
bankcmd "github.com/cosmos/cosmos-sdk/x/bank/client/cli"
@@ -27,6 +28,8 @@ func main() {
cdc := emintapp.MakeCodec()
authtypes.ModuleCdc = cdc
// Read in the configuration file for the sdk
config := sdk.GetConfig()
// TODO: Remove or change prefix if usable to generate Ethereum address
@@ -76,9 +79,13 @@ func queryCmd(cdc *amino.Codec) *cobra.Command {
}
// TODO: Possibly add these query commands from other modules
//queryCmd.AddCommand(
// ...
//)
queryCmd.AddCommand(
authcmd.GetAccountCmd(cdc),
client.LineBreak,
authcmd.QueryTxsByEventsCmd(cdc),
authcmd.QueryTxCmd(cdc),
client.LineBreak,
)
// add modules' query commands
emintapp.ModuleBasics.AddQueryCommands(queryCmd, cdc)