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

Contract created before instantiated #226

Closed
Buckram123 opened this issue Nov 15, 2024 · 4 comments
Closed

Contract created before instantiated #226

Buckram123 opened this issue Nov 15, 2024 · 4 comments
Assignees

Comments

@Buckram123
Copy link

Buckram123 commented Nov 15, 2024

On chains contract does not exist until instantiation have finished. It means that querying contract_info on env.contract.address during instantiation would fail with No such contract: ADDRESS: instantiate wasm contract failed.
The issue is that cw-multi-test does not error in this case. Would be nice to replicate chain behavior!

@DariuszDepta DariuszDepta self-assigned this Nov 15, 2024
@chipshort
Copy link
Contributor

I wonder if we should consider this a bug on the wasmd side. If we do, we should probably align the two behaviors by adjusting the behavior on the chain side. Any opinions on this?

@Buckram123
Copy link
Author

I wonder if we should consider this a bug on the wasmd side. If we do, we should probably align the two behaviors by adjusting the behavior on the chain side. Any opinions on this?

I would expect contract to know code id it's instantiated with. Agree that it's wasmd bug

@chipshort
Copy link
Contributor

Alright, I've created a wasmd issue for this now: CosmWasm/wasmd#2044
Do I understand correctly that the current MultiTest behavior is to return the same ContractInfo you would get after instantiation? Because in that case, I think we can close here and continue in the wasmd issue.

@Buckram123
Copy link
Author

Will reopen if it will get rejected by wasmd. Thanks for creating an issue @chipshort

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