-
Notifications
You must be signed in to change notification settings - Fork 570
refactor: package for blockchain application commands #583
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
Conversation
…starport/services/chain/chain.go starport/services/chain/init.go starport/services/chain/plugin-launchpad.go starport/services/chain/plugin-stargate.go starport/services/chain/plugin.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this package, nice work! 🍷
|
|
||
| // GentxCommand returns the command to generate a gentx for the chain | ||
| func (c ChainCmd) GentxCommand( | ||
| validatorName string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would cleaner if we don't require optional flags as arguments. Instead, maybe we can use a struct to pass these or ...GenTxOptions.
| } | ||
|
|
||
| // ImportKeyCommand returns the command to import a key into the chain keyring from a mnemonic | ||
| func (c ChainCmd) ImportKeyCommand(accountName string) step.Option { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since --recover option is interactive, what do you think about implementing ImportKeyCommand like this by using step.Write to write interactive input?
But this will require ImportKeyCommand to return a []step.Option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to keep minimal usage for this command and only returning step.Option of the command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! 👌 ~tested partially.
# By vms (85) and others # Via GitHub (23) and others * https://github.com/tendermint/starport: (276 commits) refactor: use a fixed-name dir for Starport Network chain sources (ignite#597) Update devices.yml (ignite#616) refactor: set chaincmd commands as version agnostic (ignite#614) feature(network): show errors from appd binary (ignite#506) refactor: use stable version of Starport in docs (ignite#610) refactor: package for blockchain application commands (ignite#583) refactor: cleanup home files (ignite#595) feat(pkg/gomodulepath): add tests for paths with versions docs: install.md (ignite#602) fix: semantic-pr fix: determining version number in go paths (ignite#598) docs: update readme with a link to v0.13 video (ignite#593) diable snapcraft ap get update fix: changelog small fix (ignite#588) Update changelog.md (ignite#587) feat(network): disable create command for Launchpad apps (ignite#586) refactor(docs): change 'pulling blockchain' to 'fetching source code' (ignite#585) Update version of tendermint/vue (ignite#582) fix: integration tests (ignite#581) ... # Conflicts: # .github/workflows/pi-image.yml # .pi/starport.json # go.mod # go.sum # starport/templates/app/launchpad/.github/workflows/build.yml.plush # starport/templates/app/launchpad/.github/workflows/pi.yml.plush # starport/templates/app/launchpad/.pi/image.bash.plush # starport/templates/app/launchpad/.pi/pibuild.json.plush # starport/templates/app/launchpad/.pi/{{appName}}d.service.plush # starport/ui/package-lock.json
Defines in the package
chaincmdall the commands related to a blockchain. The functions return astep.Optionto run the command withcmdrunner.You can define the global flags like
homeorkeyring-backendwhen creating theChainCmdobject. So that it would be easy to implement a global home that will be used by Starport for all commands.Lot of Launchpad commands have the same format as the Stargate commands. We have the specific Launchpad command in the same object with the prefix
Launchpadthis choice can be discussed.