Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI Updates, Coin fix #26

Merged
merged 7 commits into from
Feb 19, 2017
Merged

CLI Updates, Coin fix #26

merged 7 commits into from
Feb 19, 2017

Conversation

rigelrozanski
Copy link
Contributor

@rigelrozanski rigelrozanski commented Feb 10, 2017

closes #24
closes #27

added query subcommand register
modified the CLI to allow for multiple coin types sending to the transaction
fix Coin.IsGTE logic

@rigelrozanski rigelrozanski changed the title Query reg CLI Updates, Coin fix Feb 10, 2017
@@ -66,6 +66,11 @@ var (
}
)

// Register a subcommand of TxCmd to craft transactions for plugins
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix comment

@@ -35,6 +39,46 @@ func StripHex(s string) string {
return s
}

func ParseCoin(str string) (types.Coin, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix so ParseCoins calls ParseCoin, not the other way round

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roger

@@ -58,7 +102,7 @@ func Query(tmAddr string, key []byte) (*abci.ResponseQuery, error) {
// fetch the account by querying the app
func getAcc(tmAddr string, address []byte) (*types.Account, error) {

key := append([]byte("base/a/"), address...)
key := state.AccountKey(address)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@@ -69,12 +69,12 @@ func (ep *ExamplePlugin) RunTx(store types.KVStore, ctx types.CallContext, txByt
return abci.OK
}

func (ep *ExamplePlugin) InitChain(store types.KVStore, vals []*abci.Validator) {
func (cp *ExamplePlugin) InitChain(store types.KVStore, vals []*abci.Validator) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cp ? let's keep it ep for this example plugin. Thanks for fixing the methods though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

@ebuchman
Copy link
Member

Great stuff. Do the guides need to be updated for the new coins format though? Can you add that here?

@rigelrozanski
Copy link
Contributor Author

@ebuchman Yes I will investigate / update the guides for the new CLI format

@ebuchman
Copy link
Member

Can we change all the blank to mycoin ?

Also, can we get some simple tests for the ParseCoin?

@rigelrozanski rigelrozanski mentioned this pull request Feb 19, 2017
@ebuchman ebuchman merged commit 6a21ad5 into develop Feb 19, 2017
@ebuchman ebuchman deleted the queryReg branch February 21, 2017 04:06
liamsi pushed a commit to liamsi/cosmos-sdk that referenced this pull request Jun 26, 2018
ParthDesai pushed a commit to ChorusOne/cosmos-sdk that referenced this pull request Apr 19, 2021
Raumo0 pushed a commit to mapofzones/cosmos-sdk that referenced this pull request Feb 13, 2022
luchenqun pushed a commit to luchenqun/cosmos-sdk that referenced this pull request Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coin.IsGTE bad logic CLI Multiple Coins
2 participants