Skip to content

Commit

Permalink
Allowing to unvote without having to switch to a new vote (#218)
Browse files Browse the repository at this point in the history
* Refactoring vote and adding unvote feature

* Make clippy happy

* Remove unnecessary unvoted_proposals in process_unvotes

* Adding a test case for unvote

* Update wasms

* Improving readability by adding / restoring comments, renaming variables

* Store vote and voting allowed round directly in process_votes

* Adding new test: attempts to unvote non-existing or not-owned locks should fail

* Adding changelog

* Fix HydroBase.client.ts as generated by make schema

* Addressing Dusan's comments
  • Loading branch information
arlai-mk authored Feb 4, 2025
1 parent ed88739 commit 561166e
Show file tree
Hide file tree
Showing 14 changed files with 1,534 additions and 760 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/features/218-allow-unvoting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Allow users / aggregators to unvote without having to switch votes.
([\#218](https://github.com/informalsystems/hydro/pull/218))
2 changes: 1 addition & 1 deletion artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
f8a0ea2d42c8439742497b6f0f86a0b2b427a82f949fd3a639bf19706ba32319 hydro.wasm
365e5e17dcf239e5102fd97dbdcdc652e42dfd01e8b3f88520f624f6ed8f2749 hydro.wasm
83f12ed4aa3b4900588096c639a9abec78080a4c91720442b47cba1b8059e63a tribute.wasm
Binary file modified artifacts/hydro.wasm
Binary file not shown.
32 changes: 32 additions & 0 deletions contracts/hydro/schema/execute_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,38 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"unvote"
],
"properties": {
"unvote": {
"type": "object",
"required": [
"lock_ids",
"tranche_id"
],
"properties": {
"lock_ids": {
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"tranche_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
Expand Down
Loading

0 comments on commit 561166e

Please sign in to comment.