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

Add sudo and execute proposal types #730

Merged
merged 13 commits into from
Jan 24, 2022
Merged

Add sudo and execute proposal types #730

merged 13 commits into from
Jan 24, 2022

Conversation

ethanfrey
Copy link
Member

@ethanfrey ethanfrey commented Jan 21, 2022

Closes #672
Closes #711

  • Define protobuf definitions
  • Wire up as proposals in wasm module
  • Implement proposal handlers
  • Test proposal handlers
  • Add cli commands for them
  • Add rest handlers for them
  • Wire up in cli/rest
  • Test cli tooling (manually?)

@ethanfrey ethanfrey added this to the v0.22 milestone Jan 21, 2022
@codecov
Copy link

codecov bot commented Jan 24, 2022

Codecov Report

Merging #730 (20ed020) into master (74f1221) will decrease coverage by 1.62%.
The diff coverage is 14.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #730      +/-   ##
==========================================
- Coverage   59.95%   58.32%   -1.63%     
==========================================
  Files          49       49              
  Lines        5613     5807     +194     
==========================================
+ Hits         3365     3387      +22     
- Misses       2004     2170     +166     
- Partials      244      250       +6     
Impacted Files Coverage Δ
x/wasm/client/cli/gov_tx.go 0.00% <0.00%> (ø)
x/wasm/keeper/keeper.go 87.54% <ø> (ø)
x/wasm/types/test_fixtures.go 94.94% <ø> (-0.03%) ⬇️
x/wasm/types/proposal.go 63.19% <7.89%> (-19.44%) ⬇️
x/wasm/keeper/proposal_handler.go 62.58% <60.00%> (+0.68%) ⬆️
x/wasm/keeper/contract_keeper.go 92.30% <100.00%> (+0.64%) ⬆️

@ethanfrey
Copy link
Member Author

@alpe I think this is done and covered with tests. Can you please review and let me know how to test the cli better?

Copy link
Contributor

@alpe alpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎸
Please update the method doc in https://github.com/CosmWasm/wasmd/blob/master/x/wasm/keeper/keeper.go#L441
as it would not be correct anymore.

If you can add the new types to Governance.md then this would be 🚀

Disclaimer:
I have checked that the CLI commands are listed in wasmd tx gov submit-proposal -h but not executed a proposal

proto/cosmwasm/wasm/v1/proposal.proto Outdated Show resolved Hide resolved
proto/cosmwasm/wasm/v1/proposal.proto Outdated Show resolved Hide resolved
x/wasm/keeper/proposal_handler.go Show resolved Hide resolved
x/wasm/keeper/proposal_handler.go Outdated Show resolved Hide resolved
x/wasm/keeper/proposal_integration_test.go Show resolved Hide resolved
@ethanfrey ethanfrey marked this pull request as ready for review January 24, 2022 17:06
@ethanfrey
Copy link
Member Author

Thank you for the feedback. I have addressed all comments, and also added the funds field to the new execute contract proposal type. I also updated the changelog and this is ready to merge

@ethanfrey ethanfrey merged commit 24c93d6 into master Jan 24, 2022
@ethanfrey ethanfrey deleted the 672-add-sudo-propsal branch January 24, 2022 20:37
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

Successfully merging this pull request may close these issues.

Add WasmExecute proposal Add gov proposal to call sudo
2 participants