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

Single Choice and Multiple Choice Veto #752

Merged
merged 55 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
50725d5
Initial timelock / veto implementation
JakeHartnell Aug 29, 2023
b69911d
Add refund logic for veto
JakeHartnell Sep 19, 2023
45e6e0d
Refactor timelock
JakeHartnell Sep 19, 2023
e0f594e
Start v2 migration
JakeHartnell Sep 19, 2023
c956305
Start writing tests
JakeHartnell Sep 19, 2023
9a09cb4
Fix build and basic tests
JakeHartnell Oct 19, 2023
be89ce7
Fix veto checks, add more tests
JakeHartnell Oct 20, 2023
9a90cba
Cleanup unneeded changes
JakeHartnell Oct 20, 2023
f80bc40
Veto before proposal passes feature (early veto)
JakeHartnell Nov 6, 2023
bb69e94
Improve code reuse with proposal_completed_hooks
JakeHartnell Nov 7, 2023
be9331a
Fix formatting
JakeHartnell Nov 7, 2023
d803bd2
Start fixing up migration tests
JakeHartnell Nov 8, 2023
3715e94
dao-migrator test fixups
JakeHartnell Nov 8, 2023
54c5484
Tests pass, made TODO notes on future work
JakeHartnell Nov 9, 2023
6cc08c6
using Expiration & Duration for timelock; some cleanups
bekauz Nov 16, 2023
6f46e8a
readme
bekauz Nov 17, 2023
c9e8cdf
unit tests wip
bekauz Nov 17, 2023
16ba003
unit tests
bekauz Nov 18, 2023
ea1468a
fmt; test for vetoing non-open/timelocked props
bekauz Nov 18, 2023
e552168
adding semver dependency; v3 migration test assertions
bekauz Nov 19, 2023
6a24f87
readme veto extension; validating migration from v2 versions
bekauz Nov 26, 2023
a49b64b
manual to_json_binary in pr scope
bekauz Nov 26, 2023
24a5b78
Merge branch 'development' into veto
bekauz Nov 26, 2023
6e5e381
lockfile
bekauz Nov 26, 2023
871fd9c
clippy fmt
bekauz Nov 26, 2023
cdfa7e2
happy clippy
bekauz Nov 26, 2023
f03905f
schemas
bekauz Nov 26, 2023
468de37
test tube timelock fields
bekauz Nov 27, 2023
c8dca00
fmt
bekauz Nov 27, 2023
a2ca108
Bugfix: use timelock from proposal instead of config
JakeHartnell Nov 28, 2023
a22bc7a
Better doc comment
JakeHartnell Nov 28, 2023
0a71499
Cleanup unused code
Nov 28, 2023
41652af
checking validating vetoer early in veto; sanity check in execution f…
bekauz Nov 28, 2023
c3dc9cf
veto updating state before logic
bekauz Nov 30, 2023
694a9b8
pre propose error NotClosedOrExecuted renaming to NotCompleted
bekauz Nov 30, 2023
104ac2d
renaming Timelocked prop status to VetoTimelock; timelock rename to veto
bekauz Nov 30, 2023
2332539
replacing notion of timelock with veto config
bekauz Nov 30, 2023
71ae2b9
just gen
bekauz Nov 30, 2023
ede9401
revert v2 migration on prop-single
bekauz Dec 1, 2023
3d8d5c1
Reverted migrator changes and added veto to migration params.
NoahSaso Dec 2, 2023
d26b731
Updated dao-migrator schema.
NoahSaso Dec 2, 2023
4704b66
Ran clippy and formatter.
NoahSaso Dec 2, 2023
dda126b
Move proposal into passed state after the veto time lock expires.
NoahSaso Dec 2, 2023
b52da11
Updated schema.
NoahSaso Dec 2, 2023
5a0bf62
Fixed comments.
NoahSaso Dec 2, 2023
6b228ce
Fixed schema again.
NoahSaso Dec 2, 2023
223530e
Added veto to dao-proposal-multiple.
NoahSaso Dec 2, 2023
9014326
prop multi tests
bekauz Dec 3, 2023
96765b6
validating veto config
bekauz Dec 3, 2023
ee38bfb
lints
bekauz Dec 3, 2023
9884fc9
cleanup tests
bekauz Dec 3, 2023
f748e09
Fixed veto expiration calculation and removed timelock duration valid…
NoahSaso Dec 4, 2023
8752a48
Updated veto README and added to dao-proposal-multiple.
NoahSaso Dec 4, 2023
86f7970
Updated schema.
NoahSaso Dec 4, 2023
37ebd9d
Added validation that timelock_duration is the same units as the max_…
NoahSaso Dec 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
552 changes: 309 additions & 243 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ dao-voting-cw721-staked = {path = "./contracts/voting/dao-voting-cw721-staked",
dao-voting-token-staked = {path = "./contracts/voting/dao-voting-token-staked", version = "2.3.0"}

# v1 dependencies. used for state migrations.
cw-core-v1 = {package = "cw-core", version = "0.1.0"}
cw-proposal-single-v1 = {package = "cw-proposal-single", version = "0.1.0"}
cw-utils-v1 = {package = "cw-utils", version = "0.13"}
cw20-stake-external-rewards-v1 = {package = "stake-cw20-external-rewards", version = "0.2.6"}
cw20-stake-reward-distributor-v1 = {package = "stake-cw20-reward-distributor", version = "0.1.0"}
cw20-stake-v1 = {package = "cw20-stake", version = "0.2.6"}
cw20-staked-balance-voting-v1 = {package = "cw20-staked-balance-voting", version = "0.1.0"}
cw4-voting-v1 = {package = "cw4-voting", version = "0.1.0"}
stake-cw20-v03 = {package = "stake-cw20", version = "0.2.6"}
voting-v1 = {package = "dao-voting", version = "0.1.0"}
cw-core-v1 = { package = "cw-core", version = "0.1.0" }
cw-proposal-single-v1 = { package = "cw-proposal-single", version = "0.1.0" }
cw-utils-v1 = { package = "cw-utils", version = "0.13" }
cw20-stake-external-rewards-v1 = { package = "stake-cw20-external-rewards", version = "0.2.6" }
cw20-stake-reward-distributor-v1 = { package = "stake-cw20-reward-distributor", version = "0.1.0" }
cw20-stake-v1 = { package = "cw20-stake", version = "0.2.6" }
cw20-staked-balance-voting-v1 = { package = "cw20-staked-balance-voting", version = "0.1.0" }
cw4-voting-v1 = { package = "cw4-voting", version = "0.1.0" }
stake-cw20-v03 = { package = "stake-cw20", version = "0.2.6" }
voting-v1 = { package = "dao-voting", version = "0.1.0" }
1 change: 1 addition & 0 deletions ci/bootstrap-env/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ fn main() -> Result<()> {
},
},
close_proposal_on_execution_failure: false,
veto: None,
})?,
admin: Some(Admin::CoreModule {}),
funds: vec![],
Expand Down
1 change: 1 addition & 0 deletions ci/integration-tests/src/helpers/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ pub fn create_dao(
label: "DAO DAO Pre-Propose Module".to_string(),
},
},
veto: None,
})?,
admin: Some(Admin::CoreModule {}),
funds: vec![],
Expand Down
4 changes: 2 additions & 2 deletions contracts/external/dao-migrator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cw2 = { workspace = true }
cw20 = { workspace = true }
dao-interface = { workspace = true }

dao-dao-core = { workspace = true, features = ["library"] }
dao-dao-core = { workspace = true, features = ["library"] }
dao-voting = { workspace = true }
dao-proposal-single = { workspace = true, features = ["library"] }
dao-voting-cw4 = { workspace = true, features = ["library"] }
Expand All @@ -43,7 +43,7 @@ cw20-stake-v1 = { workspace = true, features = ["library"] }
cw-core-interface-v1 = { package = "cw-core-interface", version = "0.1.0", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0" }
cw4-voting-v1 = { package = "cw4-voting", version = "0.1.0", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0" }
cw20-v1 = { version = "0.13", package = "cw20" }
cw4-v1 = { version = "0.13", package = "cw4" }
cw4-v1 = { version = "0.13", package = "cw4" }

[dev-dependencies]
cosmwasm-schema = { workspace = true }
Expand Down
3 changes: 1 addition & 2 deletions contracts/external/dao-migrator/examples/schema.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use cosmwasm_schema::write_api;
use dao_proposal_single::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};
use dao_migrator::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
JakeHartnell marked this conversation as resolved.
Show resolved Hide resolved

fn main() {
write_api! {
instantiate: InstantiateMsg,
query: QueryMsg,
execute: ExecuteMsg,
migrate: MigrateMsg,
}
}
Loading
Loading