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

tx wasm upload --block flag #1897

Open
stongo opened this issue Jun 5, 2024 · 1 comment
Open

tx wasm upload --block flag #1897

stongo opened this issue Jun 5, 2024 · 1 comment

Comments

@stongo
Copy link

stongo commented Jun 5, 2024

We're having an issue with v0.51.0 (also tested previous versions) where the -b or --block flag don't appear to work. We've tested putting the flag in different argument positions, to no effect.

For example:

wasmd tx wasm upload  /app/asc.wasm --from <redacted> --chain-id testing  --gas-prices 0.25ucosm --gas auto --gas-adjustment 1.3 -y --output json -b sync

Yields a response like:

{"height":"0","txhash":"<redacted>","codespace":"","code":0,"data":"","raw_log":"","logs":[],"info":"","gas_wanted":"0","gas_used":"0
","tx":null,"timestamp":"","events":[]} 

I would expect those fields to be populated, as in the documentation https://docs.cosmwasm.com/docs/getting-started/interact-with-contract/

Please advise how to make synchronous calls. It's quite important to our automation.

@pinosu pinosu added this to the v0.53.0 milestone Jul 25, 2024
@chipshort
Copy link
Collaborator

That's because the docs use -b block, which is deprecated now. -b sync only performs some checks on the transaction, but does not wait until it is included into a block on chain.

When you use -b sync, you get the transaction hash and can poll to figure out if it is available.
Here's how it is done in cosmjs: https://github.com/cosmos/cosmjs/blob/e819a1fc0e99a3e5320d8d6667a08d3b92e5e836/packages/stargate/src/stargateclient.ts#L424
For polling on the command line, wasmd q tx --type=hash YOUR_HASH will probably get you further.

@pinosu pinosu removed this from the v0.53.0 milestone Sep 5, 2024
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

No branches or pull requests

3 participants