forked from cerc-io/laconicd-deprecated
Override auth module codec for all references to Ethermint codec (#103)
This commit is contained in:
+10
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user