-
Notifications
You must be signed in to change notification settings - Fork 429
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
Transaction index in Env is always None #932
Comments
I have added it to the next milestone to investigate. If you can make a (failing) Go testcase as a PR, that would raise this up in priority, but in any case, it should be in the next release |
I can confirm this issue. When I was debugging the env is serialized into :
in the VM execute. As I understand the Rust Env type, it expects the transaction_info to be nested in a "transaction" element |
In the Rust type, the field is called
or
The |
This is now tracked in CosmWasm/wasmvm#341, which is the repo that contains the bug. Feel free to close here. There issue will disapear with any wasmd containing wasmvm 1.1.0+. |
Patch is here: CosmWasm/wasmvm#345 |
I would keep this open if there is a chance to write an end to end test for this. Do we have an example contract already, that I can use for this to return the env data to the caller? |
Yeah, test contract "cyberpunk" with MirrorEnv execute and query message is there. Have a look at the Go test in the PR. You can copy it over to this repo but I don't think it would test more than what we test already. |
The test in wasmvm is fine and covering all that is needed for an end to end scenario. Thanks! 🏄 |
Hi,
I am trying to get information about the current transaction from an execute message with env.transaction.index on our local chain, but it always returns None.
The custom AnteHandler is set with wasmkeeper.NewCountTXDecorator (same as here: #621 (comment)), but still env.transaction is None
Reproduced it with local wasmd node and against the Malaga testnet and the demo nameservice contract from https://github.com/InterWasm/cw-contracts
Steps to reproduce:
env.transaction is None and code will panic
wasmd version 0.27.0
cosmwasm version 1.0.0
Any help will be appreciated!
Best regards,
Nina
The text was updated successfully, but these errors were encountered: