-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add submitting txs to the cli #159
Conversation
let hash = tx_output.txhash.to_string(); | ||
info!("🚀 Successfully sent tx with hash {}", hash); | ||
info!("Waiting 5 seconds for tx to be included in block....."); | ||
|
||
// TODO - a more robust timeout mechanism with polling blocks | ||
sleep(Duration::from_secs(5)).await; |
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.
A function with this polling mechanism exists in handler/utils/helpers.rs
called block_tx_commit
Changes look good, but what's the difference between this and |
Yes there isn't much difference right now. The main benefits now:
Longer term, we can build in even better error handling, support different networks through the cli (neutron, wasmd, our testnet), and I imagine for our own testnet we would want our CLI to have this functionality, since we wouldn't be using wasmd or neutrond. We could also do better handling of the msg args, instead of having to pass messy json strings with slashes in them. All in all it's a minor addition. Let me know if you think it is valuable enough to include. If so, I will merge main into here, and use block_commit_tx() as suggested. |
Support for multiple networks makes sense! What's the difference between the neutron and wasmd tools for submitting a tx right now? What happens if you try to submit a tx using Asking because I'm wondering if we should just add this network switching feature now with this pr |
Theres no support for neutrond right now. seems like we would update i agree it would be useful to add in this PR, let me look into it and get back to you here |
our discussion here would close out #75 We could just merge this as is, and work on the neutron deployment in a different PR, which is the simplest way forward |
Nice idea but too porcelain for now. Also it's only good for sending txs but maybe doesnt cover all flags options. And doesn't cover querying (eg. balances) or managing keys which would still require the underlying wasmd binary anyways. Theres a new readme instructions in here that we might want to rescue but needs to be updated and use the |
This PR started by addresses #145 but I just decided to make it a smaller PR that just adds the ability to send a TX through the CLI, so I could get familiar with the CLI code before I start #145. So it will not close #145.
What this PR does:
contract
that allows you to send a tx to the contract. Example:cargo run -- contract tx --msg "{\"query_request\": {\"emphemeral_pubkey\": \"$EPHEMERAL_PUBKEY\"}}" --contract $CONTRACT
wasmd_client.query_tx()
wasmd_client.tx_execute()