forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move sendtx and query account commands into x/bank
- Loading branch information
1 parent
00304dd
commit 356baf6
Showing
5 changed files
with
58 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package client | ||
|
||
import "github.com/spf13/cobra" | ||
|
||
const ( | ||
FlagChainID = "chain-id" | ||
FlagNode = "node" | ||
FlagHeight = "height" | ||
FlagTrustNode = "trust-node" | ||
FlagName = "name" | ||
) | ||
|
||
// GetCommands adds common flags to query commands | ||
func GetCommands(cmds ...*cobra.Command) []*cobra.Command { | ||
for _, c := range cmds { | ||
// TODO: make this default false when we support proofs | ||
c.Flags().Bool(FlagTrustNode, true, "Don't verify proofs for responses") | ||
c.Flags().String(FlagChainID, "", "Chain ID of tendermint node") | ||
c.Flags().String(FlagNode, "", "<host>:<port> to tendermint rpc interface for this chain") | ||
c.Flags().Int64(FlagHeight, 0, "block height to query, omit to get most recent provable block") | ||
} | ||
return cmds | ||
} | ||
|
||
// PostCommands adds common flags for commands to post tx | ||
func PostCommands(cmds ...*cobra.Command) []*cobra.Command { | ||
for _, c := range cmds { | ||
c.Flags().String(FlagName, "", "Name of private key with which to sign") | ||
c.Flags().String(FlagChainID, "", "Chain ID of tendermint node") | ||
c.Flags().String(FlagNode, "", "<host>:<port> to tendermint rpc interface for this chain") | ||
} | ||
return cmds | ||
} |
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
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