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

Proposal to Store WASM code should reference the wasm code being uploaded #1488

Closed
hard-nett opened this issue Jul 6, 2023 · 4 comments
Closed

Comments

@hard-nett
Copy link

Would be nice to instead of need to manually copy & paste the wasm_byte_code into the draft proposal, to reference the wasm file location in the workflow of drafting a proposal.

@alpe
Copy link
Contributor

alpe commented Jul 6, 2023

🤔 Can you help me with some examples to understand your use case better?
We have wasmd tx wasm submit-proposal for v1 gov proposals. The wasmd tx gov draft-proposal from the sdk does not work nicely with wasm proposal types. There is no way to integrate and make this more convenient. The SDK team recommended to provide our own v1 gov command instead.

@hard-nett
Copy link
Author

hard-nett commented Jul 6, 2023

@alpe no problem! On a permissioned wasm chain, after running wasmd tx gov draft-proposal, you end up with the draft-proposal file that includes null in the wasm_byte_code part of the drafted proposal.

I was envisioning during calling wasmd tx gov draft-proposal to include referencing the .wasm file locally to include it into the proposal file.

A workaround ive been doing for this is to run wasmd tx wasm store wasmcode.wasm --generate-only, and copying the generated wasm_byte_code into the draft-proposal, so that when I push the proposal, the wasm code I want to propose to upload is actually included in proposal

@hard-nett
Copy link
Author

ah ok, took a look at the gov module and found here where the proposal type gets messy with wasm proposal type.

@alpe
Copy link
Contributor

alpe commented Jul 7, 2023

Thanks for the additional details! I had run into the same issues before.
We discussed different solutions to the problem in #1301 . As there is no way to integrate with the reflection based approach in the SDK, we had added the wasmd tx wasm submit-proposal command.
This should work for you as in previous wasmd versions but is limited to only 1 message in your proposal.
I hope that gives you more context. There is nothing we can do now without forking the SDK command.

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

2 participants