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

[Bug]: Missing CosmWasm capabilities for v2.x #8758

Closed
CyberHoward opened this issue Oct 7, 2024 · 4 comments
Closed

[Bug]: Missing CosmWasm capabilities for v2.x #8758

CyberHoward opened this issue Oct 7, 2024 · 4 comments

Comments

@CyberHoward
Copy link

What happened?

We're running into the following error when deploying cosmwasm 2.x contracts to testnet.

Wasm contract requires unavailable capabilities: {\"cosmwasm_1_3\"}

I brought the error up to Confio first to ensure it's not a CW issue: https://discord.com/channels/737637324434833438/737640672680607764/1290615644785737779

Quoting Reece:

Does osmosis app.go have cosmwasm_1_3 capabilities? they should wasmapp.AllCapabilities() when registering the wasmkeeper.NewKeeper if not possible its on Osmosis side (your contract may require 2.0 & 1.3?)

When enabling feature cosmwasm_2_0 it recursively enables all the previous features, hence all of the capabilities must be enabled.

Osmosis Version

26.0.0 (testnet)

How to reproduce?

Create a smart-contract with cosmwasm-std import that enables the 2.x features.

[dependencies]
cosmwasm-std = { version = "2.0.0", features = ["cosmwasm_2_0"] }

Then compile that contract and attempt to upload it to testnet.
I did not explicitly check mainnet for this bug.

@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Osmosis Chain Development Oct 7, 2024
@CyberHoward CyberHoward changed the title [Bug]: Missing CosmWasm v2.x capabilities. [Bug]: Missing CosmWasm capabilities for v2.x Oct 7, 2024
@mattverse
Copy link
Member

hey @CyberHoward Can you tell me more about the steps to test this? I think we have a fix for this but I'm not sure of the specific steps to replicate the bug that you have had

@CyberHoward
Copy link
Author

CyberHoward commented Oct 8, 2024

I'm not sure which step is unclear to you or which tooling you're used to using to replicate the issue in the easiest way.

I'm assuming you're used to using beaker, in which case you can set up the scaffold of your reproduction with it and update the imports of the contract to use a cosmwasm_std version 2.0.0 or up and enabling the cosmwasm_2_0 feature.

I.e. change
https://github.com/osmosis-labs/beaker/blob/fc046f8fe9d8baecdd76404b57b31f5a4e100301/examples/scripting-cookbook/contracts/calculator/Cargo.toml#L44
to

cosmwasm-std = { version = "2.0.0", features = ["cosmwasm_2_0"] }

Then compile the contract and try to upload it to testnet. You should get the err that we are getting.

Edit: You can also attempt to upload one of our wasms using a UI:
Wasm: https://github.com/AbstractSDK/abstract/blob/develop/v2/framework/artifacts/abstract_ans_host.wasm
Upload using celatone: https://celatone.osmosis.zone/osmo-test-5/upload

image

@bekauz
Copy link

bekauz commented Oct 9, 2024

ran into the same issue. I believe having cosmwasm_1_4 feature is enough to trigger this as well.

@PaddyMc
Copy link
Collaborator

PaddyMc commented Oct 24, 2024

This is now fixed in main, closing this issue

@PaddyMc PaddyMc closed this as completed Oct 24, 2024
@github-project-automation github-project-automation bot moved this from Needs Triage 🔍 to Done ✅ in Osmosis Chain Development Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants