-
Notifications
You must be signed in to change notification settings - Fork 337
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
mock_env() returns a contract address that cannot be validated #2211
Comments
mock_env()
returns a contract address that cannot be validated (https://github.com/CosmWasm/cosmwasm/blob/v2.0.3/packages/std/src/testing/mock.rs#L282). I.e. the address of the contract itself cannot be canonicalized.
With #2217 being merged now (mock_env changed to use default bech32 address instead of deprecated), @chipshort do you think we should continue this advanced approach as well? It can either be
Alternatively we can leave it up to the project to come up with their |
I think we could keep it in the backlog for a 3.0, where we can then make breaking changes to the existing functions, but I would not do it now. It feels quite awkward to have multiple versions of the mocking function doing almost the same thing, but not quite. And the naming is not very obvious either. |
Good call, I like! Added to milestone |
(https://github.com/CosmWasm/cosmwasm/blob/v2.0.3/packages/std/src/testing/mock.rs#L282). I.e. the address of the contract itself cannot be canonicalized.
I wonder if we should add a mock_env method to
MockApi
or use a free function with an api argumentThe text was updated successfully, but these errors were encountered: