-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Tx CLI proto module interface #5989
Conversation
…4-module-interface
…4-module-interface
Codecov Report
@@ Coverage Diff @@
## master #5989 +/- ##
=======================================
Coverage 55.66% 55.66%
=======================================
Files 447 447
Lines 26866 26866
=======================================
Hits 14956 14956
Misses 10843 10843
Partials 1067 1067 |
This pull request introduces 1 alert when merging d0cd45a into 6469447 - view on LGTM.com new alerts:
|
@alexanderbez I started working on #5864 (comment) here. If you're able to take a quick look let me know if this approach works. I realize that almost every new CLI method is touched by the refactoring already. Wondering if I should just go ahead and refactor those methods like I did for |
@aaronc there are a lot of moving pieces going on at this point. I'm having trouble keeping track. Are you referring to the use of any? Shouldn't we wrap up migrating modules first? |
@alexanderbez this is related to module tx CLI not |
If we move to |
…4-module-interface
…4-module-interface
So far I'm thinking it makes sense to keep the current design because at a very minimum it lets us safely support proto and amino transactions from the same code base. Which, I think for now is a requirement. One thing I am noticing, is that with this design (both the tx and module design), we should probably be passing using the pointer version of The only existing instance of In general I appreciate using the functional approach and not mutating things, but doesn't seem like accomplishes much in this case. There are other cases I've seen where maybe What do you think? |
The alternative to |
We cannot pass a reference to a |
…4-module-interface
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.
utACK
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
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.
utACK
* WIP * WIP * WIP on removing x/auth dependency from client/tx * Revert unneeded changes * Simplify cli tx UX * Wire up bank tx REST routes * Fix assignment issue * Wire up bank NewSendTxCmd * fix lint * revert file * revert file * fix simcli * Refactor AccountRetriever * Fix build * Fix build * Fix build * Fix integration tests * Fix tests * Docs, linting * Linting * WIP on all modules * Implement other module new tx cmd's * Fix cmd's * Refactor existing GetTxCmd * Fix cmd * Removing deprecated code * Update ADR 020 & CHANGELOG * Lint * Lint * Lint * Lint * Lint * Lint * Lint * Fix client/tx tests * Fix mocks * Fix tests * Lint fixes * REST tx migration * Wire up REST * Linting * Update CHANGELOG, docs * Fix tests * lint * Address review feedback * Update CHANGELOG.md Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> * group vars Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Summary
ref: #5864
This adapts the
GetTxCmd
method onAppModuleBasic
to support the new tx cmd's we created in #5864 , simplifies those cmd's, and makes them amino compatible (with passing integration tests).Details
AppModuleBasic.GetTxCmd
now takes a singleCLIContext
parameterClientTx
->TxBuilder
and moved it as well as associated interfaces (likeAccountRetriever
) toclient/context
NodeQuerier
parameters toAccountRetriever
methodsTxGenerator
andAccountRetriever
fields toCLIContext
CLIContext.Marshaler
->CLIContext.JSONMarshaler
InitWithInputAndFrom
, etc. methods toCLIContext
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)