From 7f89ad1604e8022f202aef729853b0c8c7196988 Mon Sep 17 00:00:00 2001 From: Jake Hartnell Date: Sun, 9 Jul 2023 13:02:11 +0200 Subject: [PATCH] Publish v2.2.0 (#719) * Add publish script, fixups for publish (git dependencies aren't allowed) * Use publish cw-core for DAO DAO v1 interface * Refactor publish script * No wildcards... prevents publishing * Rename dao-macros -> dao-dao-macros (already taken) * Version fixups for already published packages * Rename dao-core -> dao-dao (name take on crates.io) * Rename cw-paginate -> cw-paginate-storage (name taken on crates.io) * Add metadata for publishing * Use published v1 packages * Crago file cleanup * Publish remaining packages * Go back to wildcards * Clean up and rename * Breakout more stuff from dao-dao to dao-interface to reduce circular dependencies * Remove dao-dao as a depenency of dao-voting * Fix newly emerged clippy error * Remove dao-dao-macros dep from dao-interface * Publish packages script * Test publish script v2.1.3 * Switch CI from rust nightly to stable * Update schema * Fix wrong package name in codecov * Don't tag version at end of publish script * v2.1.5 published on crates.io successfully * Rename dao-dao -> dao-dao-core * Turn of codecov failures for now * v2.2.0 (will publish when merged to main) * Fix last git dependency * Fix integration test errors from dao-dao-core rename --- .github/workflows/basic.yml | 14 +- .github/workflows/codecov.yml | 4 +- Cargo.lock | 1076 +++++++++-------- Cargo.toml | 88 +- ci/bootstrap-env/Cargo.toml | 2 +- ci/bootstrap-env/src/main.rs | 10 +- ci/integration-tests/Cargo.toml | 2 +- ci/integration-tests/README.md | 2 +- ci/integration-tests/src/helpers/helper.rs | 12 +- .../src/tests/cw20_stake_test.rs | 4 +- .../src/tests/cw_core_test.rs | 50 +- .../src/tests/dao_voting_cw721_staked_test.rs | 2 +- codecov.yml | 2 +- contracts/README.md | 2 +- .../{dao-core => dao-dao-core}/.cargo/config | 0 .../{dao-core => dao-dao-core}/.gitignore | 0 .../{dao-core => dao-dao-core}/Cargo.toml | 6 +- .../{dao-core => dao-dao-core}/README.md | 7 +- .../examples/schema.rs | 2 +- .../schema/dao-dao-core.json} | 4 +- .../src/contract.rs | 30 +- .../{dao-core => dao-dao-core}/src/error.rs | 0 .../{dao-core => dao-dao-core}/src/lib.rs | 3 - .../{dao-core => dao-dao-core}/src/msg.rs | 0 .../{dao-core => dao-dao-core}/src/state.rs | 44 +- .../{dao-core => dao-dao-core}/src/tests.rs | 14 +- .../external/cw-admin-factory/Cargo.toml | 2 +- .../schema/cw-admin-factory.json | 2 +- .../external/cw-admin-factory/src/tests.rs | 14 +- .../external/cw-fund-distributor/Cargo.toml | 5 +- .../cw-fund-distributor/src/contract.rs | 2 +- .../external/cw-payroll-factory/Cargo.toml | 1 + .../schema/cw-payroll-factory.json | 2 +- .../cw-token-swap/schema/cw-token-swap.json | 2 +- contracts/external/cw-vesting/Cargo.toml | 3 +- .../cw-vesting/schema/cw-vesting.json | 2 +- contracts/external/dao-migrator/Cargo.toml | 11 +- .../dao-migrator/schema/dao-migrator.json | 2 +- .../external/dao-migrator/src/contract.rs | 18 +- contracts/external/dao-migrator/src/msg.rs | 2 +- .../dao-migrator/src/testing/helpers.rs | 10 +- .../dao-migrator/src/testing/setup.rs | 21 +- .../src/testing/test_migration.rs | 14 +- contracts/external/dao-migrator/src/types.rs | 8 +- .../Cargo.toml | 4 +- .../dao-pre-propose-approval-single.json | 8 +- .../src/contract.rs | 2 +- .../src/tests.rs | 6 +- .../dao-pre-propose-approver/Cargo.toml | 2 +- .../schema/dao-pre-propose-approver.json | 6 +- .../dao-pre-propose-approver/src/contract.rs | 2 +- .../dao-pre-propose-approver/src/tests.rs | 8 +- .../dao-pre-propose-multiple/Cargo.toml | 2 +- .../schema/dao-pre-propose-multiple.json | 8 +- .../dao-pre-propose-multiple/src/tests.rs | 6 +- .../dao-pre-propose-single/Cargo.toml | 2 +- .../schema/dao-pre-propose-single.json | 8 +- .../dao-pre-propose-single/src/tests.rs | 6 +- .../dao-proposal-condorcet/Cargo.toml | 10 +- .../schema/dao-proposal-condorcet.json | 2 +- .../dao-proposal-condorcet/src/msg.rs | 2 +- .../dao-proposal-condorcet/src/proposal.rs | 2 +- .../src/testing/suite.rs | 15 +- .../proposal/dao-proposal-multiple/Cargo.toml | 3 +- .../schema/dao-proposal-multiple.json | 2 +- .../dao-proposal-multiple/src/contract.rs | 4 +- .../proposal/dao-proposal-multiple/src/msg.rs | 2 +- .../src/testing/do_votes.rs | 4 +- .../src/testing/instantiate.rs | 60 +- .../src/testing/queries.rs | 8 +- .../src/testing/tests.rs | 117 +- .../proposal/dao-proposal-single/Cargo.toml | 4 +- .../schema/dao-proposal-single.json | 2 +- .../dao-proposal-single/src/contract.rs | 4 +- .../proposal/dao-proposal-single/src/msg.rs | 2 +- .../src/testing/contracts.rs | 8 +- .../src/testing/do_votes.rs | 4 +- .../src/testing/instantiate.rs | 33 +- .../src/testing/migration_tests.rs | 20 +- .../src/testing/queries.rs | 6 +- .../dao-proposal-single/src/testing/tests.rs | 26 +- .../cw20-stake-external-rewards/Cargo.toml | 1 + .../schema/cw20-stake-external-rewards.json | 2 +- .../cw20-stake-reward-distributor/Cargo.toml | 2 + .../schema/cw20-stake-reward-distributor.json | 2 +- contracts/staking/cw20-stake/Cargo.toml | 4 +- .../staking/cw20-stake/schema/cw20-stake.json | 2 +- contracts/staking/cw20-stake/src/contract.rs | 2 +- .../voting/dao-voting-cw20-staked/Cargo.toml | 2 +- .../schema/dao-voting-cw20-staked.json | 2 +- .../voting/dao-voting-cw20-staked/src/msg.rs | 2 +- contracts/voting/dao-voting-cw4/Cargo.toml | 2 +- .../dao-voting-cw4/schema/dao-voting-cw4.json | 2 +- contracts/voting/dao-voting-cw4/src/msg.rs | 2 +- .../voting/dao-voting-cw721-staked/Cargo.toml | 4 +- .../schema/dao-voting-cw721-staked.json | 2 +- .../dao-voting-cw721-staked/src/contract.rs | 2 +- .../voting/dao-voting-cw721-staked/src/msg.rs | 4 +- .../src/testing/mod.rs | 2 +- .../src/testing/tests.rs | 2 +- .../dao-voting-native-staked/Cargo.toml | 4 +- .../schema/dao-voting-native-staked.json | 2 +- .../dao-voting-native-staked/src/contract.rs | 4 +- .../dao-voting-native-staked/src/msg.rs | 4 +- .../dao-voting-native-staked/src/tests.rs | 2 +- packages/cw-hooks/src/lib.rs | 4 +- .../Cargo.toml | 2 +- .../README.md | 2 +- .../src/lib.rs | 0 .../.cargo/config | 0 .../{dao-macros => dao-dao-macros}/Cargo.toml | 2 +- .../{dao-macros => dao-dao-macros}/README.md | 2 +- .../{dao-macros => dao-dao-macros}/src/lib.rs | 18 +- .../tests/govmod.rs | 2 +- .../tests/voting.rs | 2 +- packages/dao-interface/Cargo.toml | 4 +- packages/dao-interface/src/lib.rs | 129 +- .../dao-interface}/src/migrate_msg.rs | 2 +- packages/dao-interface/src/msg.rs | 240 ++++ packages/dao-interface/src/proposal.rs | 21 +- .../dao-interface}/src/query.rs | 0 packages/dao-interface/src/state.rs | 155 +++ packages/dao-interface/src/voting.rs | 59 +- packages/dao-pre-propose-base/src/msg.rs | 2 +- packages/dao-pre-propose-base/src/state.rs | 2 +- packages/dao-testing/Cargo.toml | 4 +- packages/dao-testing/src/contracts.rs | 14 +- packages/dao-testing/src/helpers.rs | 25 +- packages/dao-voting/Cargo.toml | 3 +- packages/dao-voting/src/deposit.rs | 4 +- packages/dao-voting/src/pre_propose.rs | 2 +- packages/dao-voting/src/reply.rs | 2 +- scripts/publish.sh | 197 +++ scripts/schema.sh | 4 +- .../dao-proposal-hook-counter/Cargo.toml | 3 +- .../dao-proposal-hook-counter/src/tests.rs | 22 +- test-contracts/dao-proposal-sudo/Cargo.toml | 3 +- test-contracts/dao-proposal-sudo/README | 4 +- .../dao-proposal-sudo/src/contract.rs | 2 +- .../dao-voting-cw20-balance/Cargo.toml | 3 +- .../dao-voting-cw20-balance/src/msg.rs | 2 +- 141 files changed, 1744 insertions(+), 1168 deletions(-) rename contracts/{dao-core => dao-dao-core}/.cargo/config (100%) rename contracts/{dao-core => dao-dao-core}/.gitignore (100%) rename contracts/{dao-core => dao-dao-core}/Cargo.toml (91%) rename contracts/{dao-core => dao-dao-core}/README.md (90%) rename contracts/{dao-core => dao-dao-core}/examples/schema.rs (71%) rename contracts/{dao-core/schema/dao-core.json => dao-dao-core/schema/dao-dao-core.json} (99%) rename contracts/{dao-core => dao-dao-core}/src/contract.rs (97%) rename contracts/{dao-core => dao-dao-core}/src/error.rs (100%) rename contracts/{dao-core => dao-dao-core}/src/lib.rs (78%) rename contracts/{dao-core => dao-dao-core}/src/msg.rs (100%) rename contracts/{dao-core => dao-dao-core}/src/state.rs (65%) rename contracts/{dao-core => dao-dao-core}/src/tests.rs (99%) rename packages/{cw-paginate => cw-paginate-storage}/Cargo.toml (93%) rename packages/{cw-paginate => cw-paginate-storage}/README.md (93%) rename packages/{cw-paginate => cw-paginate-storage}/src/lib.rs (100%) rename packages/{dao-macros => dao-dao-macros}/.cargo/config (100%) rename packages/{dao-macros => dao-dao-macros}/Cargo.toml (96%) rename packages/{dao-macros => dao-dao-macros}/README.md (89%) rename packages/{dao-macros => dao-dao-macros}/src/lib.rs (96%) rename packages/{dao-macros => dao-dao-macros}/tests/govmod.rs (92%) rename packages/{dao-macros => dao-dao-macros}/tests/voting.rs (95%) rename {contracts/dao-core => packages/dao-interface}/src/migrate_msg.rs (97%) create mode 100644 packages/dao-interface/src/msg.rs rename {contracts/dao-core => packages/dao-interface}/src/query.rs (100%) create mode 100644 packages/dao-interface/src/state.rs create mode 100644 scripts/publish.sh diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index ee3475659..d4b6a8256 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -12,18 +12,18 @@ jobs: - name: Checkout sources uses: actions/checkout@v2 - - name: Install latest nightly toolchain + - name: Install latest stable toolchain uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly + toolchain: stable target: wasm32-unknown-unknown override: true - name: Run tests uses: actions-rs/cargo@v1 with: - toolchain: nightly + toolchain: stable command: unit-test args: --locked env: @@ -32,7 +32,7 @@ jobs: - name: Compile WASM contract uses: actions-rs/cargo@v1 with: - toolchain: nightly + toolchain: stable command: wasm args: --locked env: @@ -49,21 +49,21 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly + toolchain: stable override: true components: rustfmt, clippy - name: Run cargo fmt uses: actions-rs/cargo@v1 with: - toolchain: nightly + toolchain: stable command: fmt args: --all -- --check - name: Run cargo clippy uses: actions-rs/cargo@v1 with: - toolchain: nightly + toolchain: stable command: clippy args: --all-targets -- -D warnings diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 3c0ae1b41..c41e83979 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -13,8 +13,8 @@ jobs: uses: actions/checkout@v2 - name: Generate code coverage run: > - cargo +nightly tarpaulin --verbose --workspace --out Xml --exclude-files test-contracts/* *test*.rs packages/dao-macros/* packages/dao-testing/* ci/* + cargo +nightly tarpaulin --verbose --workspace --out Xml --exclude-files test-contracts/* *test*.rs packages/dao-dao-macros/* packages/dao-testing/* ci/* - name: Upload to codecov.io uses: codecov/codecov-action@v3 with: - fail_ci_if_error: true + fail_ci_if_error: false diff --git a/Cargo.lock b/Cargo.lock index 98eff573b..af58a5a58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "ahash" version = "0.7.6" @@ -15,18 +30,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" dependencies = [ "memchr", ] [[package]] name = "anyhow" -version = "1.0.70" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" [[package]] name = "assert_matches" @@ -36,9 +51,9 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-stream" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad445822218ce64be7a341abfb0b1ea43b5c23aa83902542a4542e78309d8e5e" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", @@ -47,24 +62,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4655ae1a7b0cdf149156f780c5bf3f1352bc53cbd9e0a361a7ef7b22947e965" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.23", ] [[package]] name = "async-trait" -version = "0.1.67" +version = "0.1.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ea188f25f0255d8f92797797c97ebf5631fa88178beb1a46fdf5622c9a00e4" +checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.23", ] [[package]] @@ -86,9 +101,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.12" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f8ccfd9221ee7d1f3d4b33e1f8319b3a81ed8f61f2ea40b37b859794b4491" +checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" dependencies = [ "async-trait", "axum-core", @@ -114,9 +129,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2f958c80c248b34b9a877a643811be8dbca03ca5ba827f2b63baf3a81e5fc4e" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", "bytes", @@ -129,6 +144,21 @@ dependencies = [ "tower-service", ] +[[package]] +name = "backtrace" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base16ct" version = "0.1.1" @@ -160,7 +190,7 @@ dependencies = [ "pbkdf2", "rand_core 0.6.4", "ripemd", - "sha2 0.10.6", + "sha2 0.10.7", "subtle", "zeroize", ] @@ -199,12 +229,12 @@ dependencies = [ "cw-admin-factory", "cw-utils 0.16.0", "cw20 0.16.0", - "cw20-stake 2.1.0", - "dao-core", + "cw20-stake 2.2.0", + "dao-dao-core", "dao-interface", "dao-pre-propose-single", "dao-proposal-single", - "dao-voting", + "dao-voting 2.2.0", "dao-voting-cw20-staked", "env_logger", "serde", @@ -223,9 +253,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byteorder" @@ -275,9 +305,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "6340df57935414636969091153f35f68d9f00bbc8fb4a9c6054706c213e6c6bc" [[package]] name = "core-foundation" @@ -291,9 +321,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cosm-orc" @@ -333,7 +363,7 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673d31bd830c0772d78545de20d975129b6ab2f7db4e4e9313c3b8777d319194" dependencies = [ - "prost 0.11.8", + "prost 0.11.9", "prost-types", "tendermint-proto 0.26.0", "tonic", @@ -345,7 +375,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4776e787b24d9568dd61d3237eeb4eb321d622fb881b858c7b82806420e87d4" dependencies = [ - "prost 0.11.8", + "prost 0.11.9", "prost-types", "tendermint-proto 0.27.0", "tonic", @@ -374,11 +404,11 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.2.3" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f22add0f9b2a5416df98c1d0248a8d8eedb882c38fbf0c5052b64eebe865df6d" +checksum = "bb64554a91d6a9231127f4355d351130a0b94e663d5d9dc8b3a54ca17d83de49" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "ed25519-zebra", "k256", "rand_core 0.6.4", @@ -387,18 +417,18 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.2.3" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e64f710a18ef90d0a632cf27842e98ffc2d005a38a6f76c12fd0bc03bc1a2d" +checksum = "a0fb2ce09f41a3dae1a234d56a9988f9aff4c76441cd50ef1ee9a4f20415b028" dependencies = [ "syn 1.0.109", ] [[package]] name = "cosmwasm-schema" -version = "1.2.3" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe5ad2e23a971b9e4cd57b20cee3e2e79c33799bed4b128e473aca3702bfe5dd" +checksum = "230e5d1cefae5331db8934763c81b9c871db6a2cd899056a5694fa71d292c815" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -409,9 +439,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.2.3" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2926d159a9bb1a716a592b40280f1663f2491a9de3b6da77c0933cee2a2655b8" +checksum = "43dadf7c23406cb28079d69e6cb922c9c29b9157b0fe887e3b79c783b7d4bcb8" dependencies = [ "proc-macro2", "quote", @@ -420,9 +450,9 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.2.3" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76fee88ff5bf7bef55bd37ac0619974701b99bf6bd4b16cf56ee8810718abd71" +checksum = "4337eef8dfaf8572fe6b6b415d6ec25f9308c7bb09f2da63789209fb131363be" dependencies = [ "base64", "cosmwasm-crypto", @@ -433,16 +463,16 @@ dependencies = [ "schemars", "serde", "serde-json-wasm", - "sha2 0.10.6", + "sha2 0.10.7", "thiserror", "uint", ] [[package]] name = "cosmwasm-storage" -version = "1.2.3" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "639bc36408bc1ac45e3323166ceeb8f0b91b55a941c4ad59d389829002fbbd94" +checksum = "e8601d284db8776e39fe99b3416516c5636ca73cef14666b7bb9648ca32c4b89" dependencies = [ "cosmwasm-std", "serde", @@ -450,9 +480,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -518,17 +548,17 @@ dependencies = [ [[package]] name = "cw-admin-factory" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cw-multi-test", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw20-base 0.16.0", - "dao-core", + "dao-dao-core", "dao-interface", "thiserror", ] @@ -579,13 +609,14 @@ dependencies = [ [[package]] name = "cw-core" version = "0.1.0" -source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5d057329afd98d62567aaa4dca2c96f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "468b8f2696f625c8e15b5468f9420c8eabfaf23cb4fd7e6c660fc7e0cc8d77b8" dependencies = [ "cosmwasm-std", "cosmwasm-storage", - "cw-core-interface", - "cw-core-macros", - "cw-paginate 0.1.0", + "cw-core-interface 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cw-core-macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cw-paginate-storage 0.1.0", "cw-storage-plus 0.13.4", "cw-utils 0.13.4", "cw2 0.13.4", @@ -596,18 +627,42 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cw-core-interface" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c93e684945473777ebed2bcaf9f0af2291653f79d5c81774c6826350ba6d88de" +dependencies = [ + "cosmwasm-std", + "cw-core-macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cw2 0.13.4", + "schemars", + "serde", +] + [[package]] name = "cw-core-interface" version = "0.1.0" source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5d057329afd98d62567aaa4dca2c96f" dependencies = [ "cosmwasm-std", - "cw-core-macros", + "cw-core-macros 0.1.0 (git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0)", "cw2 0.13.4", "schemars", "serde", ] +[[package]] +name = "cw-core-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f20a77489d2dc8a1c12cb0b9671b6cbdca88f12fe65e1a4ee9899490f7669dcc" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "cw-core-macros" version = "0.1.0" @@ -620,7 +675,7 @@ dependencies = [ [[package]] name = "cw-denom" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -637,14 +692,14 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-multi-test", - "cw-paginate 2.1.0", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-paginate-storage 2.2.0", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw20 0.16.0", "cw20-base 0.16.0", - "cw20-stake 2.1.0", - "dao-core", + "cw20-stake 2.2.0", + "dao-dao-core", "dao-interface", "dao-voting-cw20-staked", "thiserror", @@ -652,22 +707,23 @@ dependencies = [ [[package]] name = "cw-hooks" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "thiserror", ] [[package]] name = "cw-multi-test" -version = "0.16.2" -source = "git+https://github.com/CosmWasm/cw-multi-test?rev=9af32fd42efcf28e9a79987f2c2036f879cd5331#9af32fd42efcf28e9a79987f2c2036f879cd5331" +version = "0.16.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "127c7bb95853b8e828bdab97065c81cb5ddc20f7339180b61b2300565aaa99d1" dependencies = [ "anyhow", "cosmwasm-std", - "cw-storage-plus 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cw-storage-plus 1.1.0", "cw-utils 1.0.1", "derivative", "itertools", @@ -688,7 +744,7 @@ dependencies = [ "cosmwasm-std", "cw-address-like", "cw-ownable-derive", - "cw-storage-plus 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cw-storage-plus 1.1.0", "cw-utils 1.0.1", "thiserror", ] @@ -705,9 +761,10 @@ dependencies = [ ] [[package]] -name = "cw-paginate" +name = "cw-paginate-storage" version = "0.1.0" -source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5d057329afd98d62567aaa4dca2c96f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b854833e07c557dee02d1b61a21bb0731743bb2e3bbdc3e446a0d8a38af40ec4" dependencies = [ "cosmwasm-std", "cosmwasm-storage", @@ -716,26 +773,26 @@ dependencies = [ ] [[package]] -name = "cw-paginate" -version = "2.1.0" +name = "cw-paginate-storage" +version = "2.2.0" dependencies = [ "cosmwasm-std", "cosmwasm-storage", "cw-multi-test", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "serde", ] [[package]] name = "cw-payroll-factory" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-denom", "cw-multi-test", "cw-ownable", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw-vesting", "cw2 0.16.0", @@ -748,30 +805,31 @@ dependencies = [ [[package]] name = "cw-proposal-single" version = "0.1.0" -source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5d057329afd98d62567aaa4dca2c96f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6408483e1ac17a7e2b98ef6fa1379776964353bcbf501942d22ee1c1323117" dependencies = [ "cosmwasm-std", "cosmwasm-storage", "cw-core", - "cw-core-interface", - "cw-core-macros", + "cw-core-interface 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cw-core-macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "cw-storage-plus 0.13.4", "cw-utils 0.13.4", "cw2 0.13.4", "cw20 0.13.4", "cw3 0.13.4", + "dao-voting 0.1.0", "indexable-hooks", "proposal-hooks", "schemars", "serde", "thiserror", "vote-hooks", - "voting", ] [[package]] name = "cw-stake-tracker" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -813,19 +871,9 @@ dependencies = [ [[package]] name = "cw-storage-plus" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a5083c258acd68386734f428a5a171b29f7d733151ae83090c6fcc9417ffa" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", -] - -[[package]] -name = "cw-storage-plus" -version = "1.0.1" -source = "git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42#6db957ce730a95141a3ab4dc5ab76fb38e8c0c42" +checksum = "3f0e92a069d62067f3472c62e30adedb4cab1754725c0f2a682b3128d2bf3c79" dependencies = [ "cosmwasm-std", "schemars", @@ -834,12 +882,12 @@ dependencies = [ [[package]] name = "cw-token-swap" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-multi-test", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw20 0.16.0", @@ -894,7 +942,7 @@ checksum = "c80e93d1deccb8588db03945016a292c3c631e6325d349ebb35d2db6f4f946f7" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw2 1.0.1", + "cw2 1.1.0", "schemars", "semver", "serde", @@ -903,7 +951,7 @@ dependencies = [ [[package]] name = "cw-vesting" -version = "2.1.0" +version = "2.2.0" dependencies = [ "anyhow", "cosmwasm-schema", @@ -911,9 +959,9 @@ dependencies = [ "cw-denom", "cw-multi-test", "cw-ownable", - "cw-paginate 2.1.0", + "cw-paginate-storage 2.2.0", "cw-stake-tracker", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw-wormhole", "cw2 0.16.0", @@ -927,11 +975,11 @@ dependencies = [ [[package]] name = "cw-wormhole" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "serde", ] @@ -974,15 +1022,16 @@ dependencies = [ [[package]] name = "cw2" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb70cee2cf0b4a8ff7253e6bc6647107905e8eb37208f87d54f67810faa62f8" +checksum = "29ac2dc7a55ad64173ca1e0a46697c31b7a5c51342f55a1e84a724da4eb99908" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cw-storage-plus 1.1.0", "schemars", "serde", + "thiserror", ] [[package]] @@ -1075,7 +1124,8 @@ dependencies = [ [[package]] name = "cw20-stake" version = "0.2.6" -source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5d057329afd98d62567aaa4dca2c96f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26f0d51ce27a97b51f66d737183845bc6d82f46f4b246dc959d1265d86906ccc" dependencies = [ "cosmwasm-std", "cosmwasm-storage", @@ -1092,7 +1142,7 @@ dependencies = [ [[package]] name = "cw20-stake" -version = "2.1.0" +version = "2.2.0" dependencies = [ "anyhow", "cosmwasm-schema", @@ -1101,8 +1151,8 @@ dependencies = [ "cw-controllers 0.16.0", "cw-multi-test", "cw-ownable", - "cw-paginate 2.1.0", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-paginate-storage 2.2.0", + "cw-storage-plus 1.1.0", "cw-utils 0.13.4", "cw-utils 0.16.0", "cw2 0.16.0", @@ -1114,7 +1164,7 @@ dependencies = [ [[package]] name = "cw20-stake-external-rewards" -version = "2.1.0" +version = "2.2.0" dependencies = [ "anyhow", "cosmwasm-schema", @@ -1123,31 +1173,31 @@ dependencies = [ "cw-controllers 0.16.0", "cw-multi-test", "cw-ownable", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw20 0.13.4", "cw20 0.16.0", "cw20-base 0.16.0", - "cw20-stake 2.1.0", + "cw20-stake 2.2.0", "stake-cw20-external-rewards", "thiserror", ] [[package]] name = "cw20-stake-reward-distributor" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-multi-test", "cw-ownable", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw20 0.16.0", "cw20-base 0.16.0", - "cw20-stake 2.1.0", + "cw20-stake 2.2.0", "stake-cw20-reward-distributor", "thiserror", ] @@ -1155,12 +1205,13 @@ dependencies = [ [[package]] name = "cw20-staked-balance-voting" version = "0.1.0" -source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5d057329afd98d62567aaa4dca2c96f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cf8c2ee92372d35c3a48fd6ddd490a1a4426902748017dd0b7f551d06484e28" dependencies = [ "cosmwasm-std", "cosmwasm-storage", - "cw-core-interface", - "cw-core-macros", + "cw-core-interface 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cw-core-macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "cw-storage-plus 0.13.4", "cw-utils 0.13.4", "cw2 0.13.4", @@ -1264,8 +1315,8 @@ source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5 dependencies = [ "cosmwasm-std", "cosmwasm-storage", - "cw-core-interface", - "cw-core-macros", + "cw-core-interface 0.1.0 (git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0)", + "cw-core-macros 0.1.0 (git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0)", "cw-storage-plus 0.13.4", "cw-utils 0.13.4", "cw2 0.13.4", @@ -1320,75 +1371,77 @@ dependencies = [ [[package]] name = "cw721-controllers" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "thiserror", ] [[package]] -name = "dao-core" -version = "2.1.0" +name = "dao-dao-core" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-core", "cw-multi-test", - "cw-paginate 2.1.0", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-paginate-storage 2.2.0", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw20 0.16.0", "cw20-base 0.16.0", "cw721 0.16.0", "cw721-base", + "dao-dao-macros", "dao-interface", - "dao-macros", "dao-proposal-sudo", "dao-voting-cw20-balance", "thiserror", ] [[package]] -name = "dao-interface" -version = "2.1.0" +name = "dao-dao-macros" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-hooks", - "cw2 0.16.0", - "dao-macros", + "dao-interface", + "dao-voting 2.2.0", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "dao-macros" -version = "2.1.0" +name = "dao-interface" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-hooks", - "dao-interface", - "dao-voting", - "proc-macro2", - "quote", - "syn 1.0.109", + "cw-utils 0.16.0", + "cw2 0.16.0", + "cw20 0.16.0", + "cw721 0.16.0", ] [[package]] name = "dao-migrator" -version = "2.0.2" +version = "2.2.0" dependencies = [ "anyhow", "cosmwasm-schema", "cosmwasm-std", "cw-core", - "cw-core-interface", + "cw-core-interface 0.1.0 (git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0)", "cw-multi-test", "cw-proposal-single", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.13.4", "cw-utils 0.16.0", "cw2 0.16.0", @@ -1396,43 +1449,43 @@ dependencies = [ "cw20 0.16.0", "cw20-base 0.16.0", "cw20-stake 0.2.6", - "cw20-stake 2.1.0", + "cw20-stake 2.2.0", "cw20-staked-balance-voting", "cw4 0.13.4", "cw4-voting", - "dao-core", + "dao-dao-core", "dao-interface", "dao-proposal-single", "dao-testing", - "dao-voting", + "dao-voting 0.1.0", + "dao-voting 2.2.0", "dao-voting-cw20-staked", "dao-voting-cw4", "thiserror", - "voting", ] [[package]] name = "dao-pre-propose-approval-single" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-denom", "cw-multi-test", - "cw-paginate 2.1.0", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-paginate-storage 2.2.0", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw20 0.16.0", "cw20-base 0.16.0", "cw4-group 0.16.0", - "dao-core", + "dao-dao-core", "dao-interface", "dao-pre-propose-base", "dao-proposal-hooks", "dao-proposal-single", "dao-testing", - "dao-voting", + "dao-voting 2.2.0", "dao-voting-cw20-staked", "dao-voting-cw4", "thiserror", @@ -1440,52 +1493,52 @@ dependencies = [ [[package]] name = "dao-pre-propose-approver" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-denom", "cw-multi-test", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw20 0.16.0", "cw20-base 0.16.0", "cw4-group 0.16.0", - "dao-core", + "dao-dao-core", "dao-interface", "dao-pre-propose-approval-single", "dao-pre-propose-base", "dao-proposal-hooks", "dao-proposal-single", "dao-testing", - "dao-voting", + "dao-voting 2.2.0", "dao-voting-cw20-staked", "dao-voting-cw4", ] [[package]] name = "dao-pre-propose-base" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-denom", "cw-hooks", "cw-multi-test", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "dao-interface", "dao-proposal-hooks", - "dao-voting", + "dao-voting 2.2.0", "serde", "thiserror", ] [[package]] name = "dao-pre-propose-multiple" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1496,20 +1549,20 @@ dependencies = [ "cw20 0.16.0", "cw20-base 0.16.0", "cw4-group 0.16.0", - "dao-core", + "dao-dao-core", "dao-interface", "dao-pre-propose-base", "dao-proposal-hooks", "dao-proposal-multiple", "dao-testing", - "dao-voting", + "dao-voting 2.2.0", "dao-voting-cw20-staked", "dao-voting-cw4", ] [[package]] name = "dao-pre-propose-single" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1521,75 +1574,75 @@ dependencies = [ "cw20 0.16.0", "cw20-base 0.16.0", "cw4-group 0.16.0", - "dao-core", + "dao-dao-core", "dao-interface", "dao-pre-propose-base", "dao-proposal-hooks", "dao-proposal-single", "dao-testing", - "dao-voting", + "dao-voting 2.2.0", "dao-voting-cw20-staked", "dao-voting-cw4", ] [[package]] name = "dao-proposal-condorcet" -version = "0.1.0" +version = "2.2.0" dependencies = [ "anyhow", "cosmwasm-schema", "cosmwasm-std", "cw-multi-test", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw4 0.16.0", "cw4-group 0.16.0", - "dao-core", + "dao-dao-core", + "dao-dao-macros", "dao-interface", - "dao-macros", "dao-testing", - "dao-voting", + "dao-voting 2.2.0", "dao-voting-cw4", "thiserror", ] [[package]] name = "dao-proposal-hook-counter" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-hooks", "cw-multi-test", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw20 0.16.0", "cw20-base 0.16.0", - "dao-core", + "dao-dao-core", "dao-interface", "dao-proposal-hooks", "dao-proposal-single", "dao-vote-hooks", - "dao-voting", + "dao-voting 2.2.0", "dao-voting-cw20-balance", "thiserror", ] [[package]] name = "dao-proposal-hooks" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-hooks", - "dao-voting", + "dao-voting 2.2.0", ] [[package]] name = "dao-proposal-multiple" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1597,25 +1650,25 @@ dependencies = [ "cw-denom", "cw-hooks", "cw-multi-test", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw20 0.16.0", "cw20-base 0.16.0", - "cw20-stake 2.1.0", + "cw20-stake 2.2.0", "cw3 0.16.0", "cw4 0.16.0", "cw4-group 0.16.0", "cw721-base", - "dao-core", + "dao-dao-macros", "dao-interface", - "dao-macros", "dao-pre-propose-base", "dao-pre-propose-multiple", "dao-proposal-hooks", "dao-testing", "dao-vote-hooks", - "dao-voting", + "dao-voting 0.1.0", + "dao-voting 2.2.0", "dao-voting-cw20-balance", "dao-voting-cw20-staked", "dao-voting-cw4", @@ -1623,12 +1676,11 @@ dependencies = [ "dao-voting-native-staked", "rand", "thiserror", - "voting", ] [[package]] name = "dao-proposal-single" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1638,53 +1690,53 @@ dependencies = [ "cw-hooks", "cw-multi-test", "cw-proposal-single", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.13.4", "cw-utils 0.16.0", "cw2 0.16.0", "cw20 0.16.0", "cw20-base 0.16.0", - "cw20-stake 2.1.0", + "cw20-stake 2.2.0", "cw3 0.16.0", "cw4 0.16.0", "cw4-group 0.16.0", "cw721-base", - "dao-core", + "dao-dao-core", + "dao-dao-macros", "dao-interface", - "dao-macros", "dao-pre-propose-base", "dao-pre-propose-single", "dao-proposal-hooks", "dao-testing", "dao-vote-hooks", - "dao-voting", + "dao-voting 0.1.0", + "dao-voting 2.2.0", "dao-voting-cw20-balance", "dao-voting-cw20-staked", "dao-voting-cw4", "dao-voting-cw721-staked", "dao-voting-native-staked", "thiserror", - "voting", ] [[package]] name = "dao-proposal-sudo" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cw-multi-test", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw2 0.16.0", + "dao-dao-macros", "dao-interface", - "dao-macros", "thiserror", ] [[package]] name = "dao-testing" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1697,17 +1749,18 @@ dependencies = [ "cw2 0.16.0", "cw20 0.16.0", "cw20-base 0.16.0", - "cw20-stake 2.1.0", + "cw20-stake 2.2.0", "cw4 0.16.0", "cw4-group 0.16.0", "cw721-base", - "dao-core", + "dao-dao-core", "dao-interface", "dao-pre-propose-multiple", "dao-pre-propose-single", "dao-proposal-condorcet", "dao-proposal-single", - "dao-voting", + "dao-voting 0.1.0", + "dao-voting 2.2.0", "dao-voting-cw20-balance", "dao-voting-cw20-staked", "dao-voting-cw4", @@ -1715,114 +1768,124 @@ dependencies = [ "dao-voting-native-staked", "rand", "stake-cw20", - "voting", ] [[package]] name = "dao-vote-hooks" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-hooks", - "dao-voting", + "dao-voting 2.2.0", ] [[package]] name = "dao-voting" -version = "2.1.0" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "442d770933e3b3ecab4cfb4d6e9d054082b007d35fda3cf0c3d3ddd1cfa91782" +dependencies = [ + "cosmwasm-std", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "dao-voting" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-denom", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw20 0.16.0", - "dao-core", + "dao-dao-macros", "dao-interface", - "dao-macros", "thiserror", ] [[package]] name = "dao-voting-cw20-balance" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-multi-test", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw20 0.16.0", "cw20-base 0.16.0", + "dao-dao-macros", "dao-interface", - "dao-macros", "thiserror", ] [[package]] name = "dao-voting-cw20-staked" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cw-multi-test", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw20 0.16.0", "cw20-base 0.16.0", - "cw20-stake 2.1.0", + "cw20-stake 2.2.0", + "dao-dao-macros", "dao-interface", - "dao-macros", "thiserror", ] [[package]] name = "dao-voting-cw4" -version = "2.1.0" +version = "2.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cw-multi-test", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw4 0.16.0", "cw4-group 0.16.0", + "dao-dao-macros", "dao-interface", - "dao-macros", "thiserror", ] [[package]] name = "dao-voting-cw721-staked" -version = "2.1.0" +version = "2.2.0" dependencies = [ "anyhow", "cosmwasm-schema", "cosmwasm-std", "cw-controllers 0.16.0", "cw-multi-test", - "cw-paginate 2.1.0", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-paginate-storage 2.2.0", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", "cw721 0.16.0", "cw721-base", "cw721-controllers", + "dao-dao-macros", "dao-interface", - "dao-macros", "dao-testing", "thiserror", ] [[package]] name = "dao-voting-native-staked" -version = "2.1.0" +version = "2.2.0" dependencies = [ "anyhow", "cosmwasm-schema", @@ -1830,12 +1893,12 @@ dependencies = [ "cosmwasm-storage", "cw-controllers 0.16.0", "cw-multi-test", - "cw-paginate 2.1.0", - "cw-storage-plus 1.0.1 (git+https://github.com/CosmWasm/cw-storage-plus?rev=6db957ce730a95141a3ab4dc5ab76fb38e8c0c42)", + "cw-paginate-storage 2.2.0", + "cw-storage-plus 1.1.0", "cw-utils 0.16.0", "cw2 0.16.0", + "dao-dao-macros", "dao-interface", - "dao-macros", "thiserror", ] @@ -1871,9 +1934,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", "crypto-common", @@ -1932,7 +1995,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", - "hashbrown", + "hashbrown 0.12.3", "hex", "rand_core 0.6.4", "serde", @@ -1955,7 +2018,7 @@ dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.6", + "digest 0.10.7", "ff", "generic-array", "group", @@ -1979,11 +2042,17 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" + [[package]] name = "erased-serde" -version = "0.3.25" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2b0c2380453a92ea8b6c8e5f64ecaafccddde8ceab55ff7a8ac1029f894569" +checksum = "f94c0e13118e7d7533271f754a168ae8400e6a1cc043f2bfd53cc7290f1a1de3" dependencies = [ "serde", ] @@ -2026,9 +2095,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -2041,9 +2110,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "futures" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -2056,9 +2125,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -2066,15 +2135,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -2083,38 +2152,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.23", ] [[package]] name = "futures-sink" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -2130,9 +2199,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -2140,9 +2209,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "js-sys", @@ -2151,6 +2220,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + [[package]] name = "group" version = "0.12.1" @@ -2164,9 +2239,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.16" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -2174,7 +2249,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -2190,6 +2265,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "headers" version = "0.3.8" @@ -2226,12 +2307,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -2245,7 +2323,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -2290,9 +2368,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.25" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -2363,9 +2441,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2380,7 +2458,8 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexable-hooks" version = "0.1.0" -source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5d057329afd98d62567aaa4dca2c96f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d70922e1e0e68d99ec1a24446c70756cc3e56deaddb505b1f4b43914522d809" dependencies = [ "cosmwasm-std", "cw-storage-plus 0.13.4", @@ -2391,12 +2470,22 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", ] [[package]] @@ -2413,14 +2502,14 @@ dependencies = [ "cw-vesting", "cw20 0.16.0", "cw20-base 0.16.0", - "cw20-stake 2.1.0", + "cw20-stake 2.2.0", "cw721 0.16.0", "cw721-base", - "dao-core", + "dao-dao-core", "dao-interface", "dao-pre-propose-single", "dao-proposal-single", - "dao-voting", + "dao-voting 2.2.0", "dao-voting-cw20-staked", "dao-voting-cw721-staked", "env_logger", @@ -2442,15 +2531,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -2475,15 +2564,15 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.6", + "sha2 0.10.7", "sha3", ] [[package]] name = "keccak" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" dependencies = [ "cpufeatures", ] @@ -2496,9 +2585,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.140" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "linked-hash-map" @@ -2508,12 +2597,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "matchit" @@ -2539,16 +2625,24 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] @@ -2583,19 +2677,28 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] +[[package]] +name = "object" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -2616,14 +2719,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" dependencies = [ "dlv-list", - "hashbrown", + "hashbrown 0.12.3", ] [[package]] name = "paste" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" [[package]] name = "pathdiff" @@ -2637,7 +2740,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -2669,15 +2772,15 @@ checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088" [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.5.6" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cbd939b234e95d72bc393d51788aec68aeeb5d51e748ca08ff3aad58cb722f7" +checksum = "f73935e4d55e2abf7f130186537b19e7a4abc886a0252380b59248af473a3fc9" dependencies = [ "thiserror", "ucd-trie", @@ -2685,9 +2788,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.6" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a81186863f3d0a27340815be8f2078dd8050b14cd71913db9fbda795e5f707d7" +checksum = "aef623c9bbfa0eedf5a0efba11a5ee83209c326653ca31ff019bec3a95bfff2b" dependencies = [ "pest", "pest_generator", @@ -2695,53 +2798,53 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.6" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a1ef20bf3193c15ac345acb32e26b3dc3223aff4d77ae4fc5359567683796b" +checksum = "b3e8cba4ec22bada7fc55ffe51e2deb6a0e0db2d0b7ab0b103acc80d2510c190" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.23", ] [[package]] name = "pest_meta" -version = "2.5.6" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80" +checksum = "a01f71cb40bd8bb94232df14b946909e14660e33fc05db3e50ae2a82d7ea0ca0" dependencies = [ "once_cell", "pest", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.23", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -2767,9 +2870,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.53" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" +checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" dependencies = [ "unicode-ident", ] @@ -2777,7 +2880,8 @@ dependencies = [ [[package]] name = "proposal-hooks" version = "0.1.0" -source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5d057329afd98d62567aaa4dca2c96f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9a2f15b848398bad689771b35313c7e7095e772d444e299dbdb54b906691f8a" dependencies = [ "cosmwasm-std", "indexable-hooks", @@ -2797,12 +2901,12 @@ dependencies = [ [[package]] name = "prost" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48e50df39172a3e7eb17e14642445da64996989bc212b583015435d39a58537" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive 0.11.8", + "prost-derive 0.11.9", ] [[package]] @@ -2820,9 +2924,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea9b0f8cbe5e15a8a042d030bd96668db28ecb567ec37d691971ff5731d2b1b" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", "itertools", @@ -2833,18 +2937,18 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379119666929a1afd7a043aa6cf96fa67a6dce9af60c88095a4686dbce4c9c88" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost 0.11.8", + "prost 0.11.9", ] [[package]] name = "quote" -version = "1.0.26" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ "proc-macro2", ] @@ -2887,9 +2991,21 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.2" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89089e897c013b3deb627116ae56a6955a72b8bed395c9526af31c9fe528b484" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce168fea28d3e05f158bda4576cf0c844d5045bc2cc3620fa0292ed5bb5814c" +checksum = "fa250384981ea14565685dea16a9ccc4d1c541a13f82b9c168572264d1df8c56" dependencies = [ "aho-corasick", "memchr", @@ -2898,9 +3014,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" [[package]] name = "rfc6979" @@ -2934,7 +3050,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -2969,6 +3085,12 @@ dependencies = [ "ordered-multimap", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustls" version = "0.19.1" @@ -2996,15 +3118,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" [[package]] name = "same-file" @@ -3017,11 +3139,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -3074,9 +3196,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" dependencies = [ "bitflags", "core-foundation", @@ -3087,9 +3209,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" dependencies = [ "core-foundation-sys", "libc", @@ -3103,40 +3225,40 @@ checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.158" +version = "1.0.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" +checksum = "7daf513456463b42aa1d94cff7e0c24d682b429f020b9afa4f5ba5c40a22b237" dependencies = [ "serde_derive", ] [[package]] name = "serde-json-wasm" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15bee9b04dd165c3f4e142628982ddde884c2022a89e8ddf99c4829bf2c3a58" +checksum = "16a62a1fad1e1828b24acac8f2b468971dade7b8c3c2e672bcadefefb1f8c137" dependencies = [ "serde", ] [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "5a16be4fe5320ade08736447e3198294a5ea9a6d44dde6f35f0a5e06859c427a" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.158" +version = "1.0.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" +checksum = "b69b106b68bc8054f0e974e70d19984040f8a5cf9215ca82626ea4853f82c4b9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.23", ] [[package]] @@ -3152,9 +3274,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" dependencies = [ "itoa", "ryu", @@ -3163,22 +3285,22 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "1d89a8107374290037607734c0b73a85db7ed80cae314b3c5791f192a496e731" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.23", ] [[package]] name = "serde_yaml" -version = "0.9.19" +version = "0.9.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82e6c8c047aa50a7328632d067bcae6ef38772a79e28daf32f735e0e4f3dd10" +checksum = "452e67b9c20c37fa79df53201dc03839651086ed9bbe92b3ca585ca9fdaa7d85" dependencies = [ - "indexmap", + "indexmap 2.0.0", "itoa", "ryu", "serde", @@ -3193,7 +3315,7 @@ checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -3211,22 +3333,22 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", + "digest 0.10.7", ] [[package]] name = "sha3" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "keccak", ] @@ -3236,7 +3358,7 @@ version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "rand_core 0.6.4", ] @@ -3278,7 +3400,8 @@ dependencies = [ [[package]] name = "stake-cw20" version = "0.2.6" -source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v0.3.0#5d46fc6f4a9a2fed3a85e700215d0421e1c196be" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfbd45133276dbe4d6588899f4d4d06fdb9f16921fd1394affc0bccc9a5cb0b6" dependencies = [ "cosmwasm-std", "cosmwasm-storage", @@ -3296,7 +3419,8 @@ dependencies = [ [[package]] name = "stake-cw20-external-rewards" version = "0.2.6" -source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5d057329afd98d62567aaa4dca2c96f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9bbc1e4b7a932957a05a76921015a849b234c3f25e59fe1fd0d2eab71654bc" dependencies = [ "cosmwasm-std", "cosmwasm-storage", @@ -3315,7 +3439,8 @@ dependencies = [ [[package]] name = "stake-cw20-reward-distributor" version = "0.1.0" -source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5d057329afd98d62567aaa4dca2c96f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4260ff7aec6dddb43cb5f1104ef5cebe2787853bc83af9172ce5b828b577c4c5" dependencies = [ "cosmwasm-std", "cosmwasm-storage", @@ -3338,9 +3463,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "subtle-encoding" @@ -3364,9 +3489,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.5" +version = "2.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89c2d1c76a26822187a1fbb5964e3fff108bc208f02e820ab9dac1234f6b388a" +checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" dependencies = [ "proc-macro2", "quote", @@ -3379,18 +3504,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - [[package]] name = "tendermint" version = "0.26.0" @@ -3406,7 +3519,7 @@ dependencies = [ "k256", "num-traits", "once_cell", - "prost 0.11.8", + "prost 0.11.9", "prost-types", "ripemd160", "serde", @@ -3446,7 +3559,7 @@ dependencies = [ "flex-error", "num-derive", "num-traits", - "prost 0.11.8", + "prost 0.11.9", "prost-types", "serde", "serde_bytes", @@ -3464,7 +3577,7 @@ dependencies = [ "flex-error", "num-derive", "num-traits", - "prost 0.11.8", + "prost 0.11.9", "prost-types", "serde", "serde_bytes", @@ -3538,29 +3651,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.23", ] [[package]] name = "time" -version = "0.3.20" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" dependencies = [ "serde", "time-core", @@ -3569,15 +3682,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" dependencies = [ "time-core", ] @@ -3599,20 +3712,20 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.26.0" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", "pin-project-lite", "socket2", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] @@ -3627,13 +3740,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.23", ] [[package]] @@ -3649,9 +3762,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -3660,9 +3773,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -3701,8 +3814,8 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost 0.11.8", - "prost-derive 0.11.8", + "prost 0.11.9", + "prost-derive 0.11.9", "tokio", "tokio-stream", "tokio-util", @@ -3721,7 +3834,7 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "indexmap", + "indexmap 1.9.3", "pin-project", "pin-project-lite", "rand", @@ -3759,20 +3872,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.23", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", ] @@ -3801,9 +3914,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uint" @@ -3825,9 +3938,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" [[package]] name = "unicode-normalization" @@ -3838,17 +3951,11 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "unsafe-libyaml" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad2024452afd3874bf539695e04af6732ba06517424dbf958fdb16a01f3bef6c" +checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" [[package]] name = "untrusted" @@ -3858,9 +3965,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", @@ -3882,7 +3989,8 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vote-hooks" version = "0.1.0" -source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5d057329afd98d62567aaa4dca2c96f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef617ad17edd195f8a3bce72498bfcc406a27cecfc23828f562fa91a3e2fb141" dependencies = [ "cosmwasm-std", "indexable-hooks", @@ -3890,17 +3998,6 @@ dependencies = [ "serde", ] -[[package]] -name = "voting" -version = "0.1.0" -source = "git+https://github.com/DA0-DA0/dao-contracts.git?tag=v1.0.0#e531c760a5d057329afd98d62567aaa4dca2c96f" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", - "thiserror", -] - [[package]] name = "walkdir" version = "2.3.3" @@ -3913,11 +4010,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -3929,9 +4025,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3939,24 +4035,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.23", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3964,28 +4060,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.23", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -4043,33 +4139,18 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.2" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -4082,45 +4163,45 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.2" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" -version = "0.42.2" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" -version = "0.42.2" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.42.2" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.42.2" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.2" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "wynd-utils" @@ -4145,21 +4226,20 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure", + "syn 2.0.23", ] diff --git a/Cargo.toml b/Cargo.toml index 178eb2c7e..aeea5ed91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] members = [ - "contracts/dao-core", + "contracts/dao-dao-core", "contracts/proposal/*", "contracts/pre-propose/*", "contracts/staking/*", @@ -16,7 +16,7 @@ exclude = ["ci/configs/"] edition = "2021" license = "BSD-3-Clause" repository = "https://github.com/DA0-DA0/dao-contracts" -version = "2.1.0" +version = "2.2.0" [profile.release.package.stake-cw20-external-rewards] codegen-units = 1 @@ -41,8 +41,8 @@ cosmwasm-schema = { version = "1.1" } cosmwasm-std = { version = "1.1", features = ["ibc3"] } cosmwasm-storage = { version = "1.1" } cw-controllers = "0.16" -cw-multi-test = { rev = "9af32fd42efcf28e9a79987f2c2036f879cd5331", git = "https://github.com/CosmWasm/cw-multi-test" } -cw-storage-plus = { rev = "6db957ce730a95141a3ab4dc5ab76fb38e8c0c42", git = "https://github.com/CosmWasm/cw-storage-plus" } +cw-multi-test = { version = "0.16" } +cw-storage-plus = { version = "1.1" } cw-utils = "0.16" cw2 = "0.16" cw20 = "0.16" @@ -64,46 +64,46 @@ wynd-utils = "0.4.1" # optional owner. cw-ownable = "0.5.0" -cw-admin-factory = { path = "./contracts/external/cw-admin-factory" } -cw-denom = { path = "./packages/cw-denom", version = "*" } -cw-hooks = { path = "./packages/cw-hooks", version = "*" } -cw-wormhole = { path = "./packages/cw-wormhole", version = "*" } -cw-paginate = { path = "./packages/cw-paginate", version = "*" } -cw-payroll-factory = { path = "./contracts/external/cw-payroll-factory" } -cw-vesting = { path = "./contracts/external/cw-vesting" } -cw20-stake = { path = "./contracts/staking/cw20-stake", version = "*" } -cw-stake-tracker = { path = "./packages/cw-stake-tracker", version = "*" } -cw721-controllers = { path = "./packages/cw721-controllers", version = "*" } -dao-core = { path = "./contracts/dao-core" } -dao-interface = { path = "./packages/dao-interface", version = "*" } -dao-macros = { path = "./packages/dao-macros", version = "*" } -dao-pre-propose-approval-single = { path = "./contracts/pre-propose/dao-pre-propose-approval-single", version = "*" } -dao-pre-propose-approver = { path = "./contracts/pre-propose/dao-pre-propose-approver", version = "*" } -dao-pre-propose-base = { path = "./packages/dao-pre-propose-base", version = "*" } -dao-pre-propose-multiple = { path = "./contracts/pre-propose/dao-pre-propose-multiple", version = "*" } -dao-pre-propose-single = { path = "./contracts/pre-propose/dao-pre-propose-single", version = "*" } -dao-proposal-condorcet = { path = "./contracts/proposal/dao-proposal-condorcet", version = "*" } -dao-proposal-hooks = { path = "./packages/dao-proposal-hooks", version = "*" } -dao-proposal-multiple = { path = "./contracts/proposal/dao-proposal-multiple", version = "*" } -dao-proposal-single = { path = "./contracts/proposal/dao-proposal-single", version = "*" } -dao-proposal-sudo = { path = "./test-contracts/dao-proposal-sudo", version = "*" } -dao-testing = { path = "./packages/dao-testing", version = "*" } -dao-vote-hooks = { path = "./packages/dao-vote-hooks", version = "*" } -dao-voting = { path = "./packages/dao-voting", version = "*" } -dao-voting-cw20-balance = { path = "./test-contracts/dao-voting-cw20-balance", version = "*" } -dao-voting-cw20-staked = { path = "./contracts/voting/dao-voting-cw20-staked", version = "*" } -dao-voting-cw4 = { path = "./contracts/voting/dao-voting-cw4", version = "*" } -dao-voting-cw721-staked = { path = "./contracts/voting/dao-voting-cw721-staked", version = "*" } -dao-voting-native-staked = { path = "./contracts/voting/dao-voting-native-staked", version = "*" } +cw-admin-factory = { path = "./contracts/external/cw-admin-factory", version = "2.2.0" } +cw-denom = { path = "./packages/cw-denom", version = "2.2.0" } +cw-hooks = { path = "./packages/cw-hooks", version = "2.2.0" } +cw-wormhole = { path = "./packages/cw-wormhole", version = "2.2.0" } +cw-paginate-storage = { path = "./packages/cw-paginate-storage", version = "2.2.0" } +cw-payroll-factory = { path = "./contracts/external/cw-payroll-factory", version = "2.2.0" } +cw-vesting = { path = "./contracts/external/cw-vesting", version = "2.2.0" } +cw20-stake = { path = "./contracts/staking/cw20-stake", version = "2.2.0" } +cw-stake-tracker = { path = "./packages/cw-stake-tracker", version = "2.2.0" } +cw721-controllers = { path = "./packages/cw721-controllers", version = "2.2.0" } +dao-dao-core = { path = "./contracts/dao-dao-core", version = "2.2.0" } +dao-interface = { path = "./packages/dao-interface", version = "2.2.0" } +dao-dao-macros = { path = "./packages/dao-dao-macros", version = "2.2.0" } +dao-pre-propose-approval-single = { path = "./contracts/pre-propose/dao-pre-propose-approval-single", version = "2.2.0" } +dao-pre-propose-approver = { path = "./contracts/pre-propose/dao-pre-propose-approver", version = "2.2.0" } +dao-pre-propose-base = { path = "./packages/dao-pre-propose-base", version = "2.2.0" } +dao-pre-propose-multiple = { path = "./contracts/pre-propose/dao-pre-propose-multiple", version = "2.2.0" } +dao-pre-propose-single = { path = "./contracts/pre-propose/dao-pre-propose-single", version = "2.2.0" } +dao-proposal-condorcet = { path = "./contracts/proposal/dao-proposal-condorcet", version = "2.2.0" } +dao-proposal-hooks = { path = "./packages/dao-proposal-hooks", version = "2.2.0" } +dao-proposal-multiple = { path = "./contracts/proposal/dao-proposal-multiple", version = "2.2.0" } +dao-proposal-single = { path = "./contracts/proposal/dao-proposal-single", version = "2.2.0" } +dao-proposal-sudo = { path = "./test-contracts/dao-proposal-sudo", version = "2.2.0" } +dao-testing = { path = "./packages/dao-testing", version = "2.2.0" } +dao-vote-hooks = { path = "./packages/dao-vote-hooks", version = "2.2.0" } +dao-voting = { path = "./packages/dao-voting", version = "2.2.0" } +dao-voting-cw20-balance = { path = "./test-contracts/dao-voting-cw20-balance", version = "2.2.0" } +dao-voting-cw20-staked = { path = "./contracts/voting/dao-voting-cw20-staked", version = "2.2.0" } +dao-voting-cw4 = { path = "./contracts/voting/dao-voting-cw4", version = "2.2.0" } +dao-voting-cw721-staked = { path = "./contracts/voting/dao-voting-cw721-staked", version = "2.2.0" } +dao-voting-native-staked = { path = "./contracts/voting/dao-voting-native-staked", version = "2.2.0" } # v1 dependencies. used for state migrations. -cw-core-v1 = { package = "cw-core", version = "0.1.0", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0" } -cw-proposal-single-v1 = { package = "cw-proposal-single", version = "0.1.0", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.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", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0" } -cw20-stake-reward-distributor-v1 = { package = "stake-cw20-reward-distributor", version = "0.1.0", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0" } -cw20-stake-v1 = { package = "cw20-stake", version = "0.2.6", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0" } -cw20-staked-balance-voting-v1 = { package = "cw20-staked-balance-voting", 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" } -voting-v1 = { package = "voting", version = "0.1.0", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0" } -stake-cw20-v03 = { package = "stake-cw20", version = "0.2.6", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v0.3.0" } +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" } +voting-v1 = { package = "dao-voting", version = "0.1.0" } +stake-cw20-v03 = { package = "stake-cw20", version = "0.2.6" } diff --git a/ci/bootstrap-env/Cargo.toml b/ci/bootstrap-env/Cargo.toml index a2c66693e..0a037220e 100644 --- a/ci/bootstrap-env/Cargo.toml +++ b/ci/bootstrap-env/Cargo.toml @@ -10,7 +10,7 @@ cw20 = { workspace = true } cw-utils = { workspace = true } cosmwasm-std = { workspace = true, features = ["ibc3"] } cw-admin-factory = { workspace = true } -dao-core = { workspace = true } +dao-dao-core = { workspace = true } cw20-stake = { workspace = true } dao-voting-cw20-staked = { workspace = true } dao-proposal-single = { workspace = true } diff --git a/ci/bootstrap-env/src/main.rs b/ci/bootstrap-env/src/main.rs index 8f2b8578b..b8bdeb0a5 100644 --- a/ci/bootstrap-env/src/main.rs +++ b/ci/bootstrap-env/src/main.rs @@ -3,7 +3,7 @@ use cosm_orc::orchestrator::{Coin, Key, SigningKey}; use cosm_orc::{config::cfg::Config, orchestrator::cosm_orc::CosmOrc}; use cosmwasm_std::{to_binary, Decimal, Empty, Uint128}; use cw20::Cw20Coin; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use dao_voting::{ deposit::{DepositRefundPolicy, DepositToken, UncheckedDepositInfo}, pre_propose::PreProposeInfo, @@ -45,7 +45,7 @@ fn main() -> Result<()> { orc.store_contracts("artifacts", &key, None)?; - let msg = dao_core::msg::InstantiateMsg { + let msg = dao_interface::msg::InstantiateMsg { admin: Some(addr.clone()), name: "DAO DAO".to_string(), description: "A DAO that makes DAO tooling".to_string(), @@ -114,7 +114,7 @@ fn main() -> Result<()> { // Init dao dao dao with an initial treasury of 9000000 tokens orc.instantiate( - "dao_core", + "dao_dao_core", "dao_init", &msg, &key, @@ -149,7 +149,7 @@ fn main() -> Result<()> { ); println!( "NEXT_PUBLIC_CWCORE_CODE_ID={}", - orc.contract_map.code_id("dao_core")? + orc.contract_map.code_id("dao_dao_core")? ); println!( "NEXT_PUBLIC_CWPROPOSALSINGLE_CODE_ID={}", @@ -169,7 +169,7 @@ fn main() -> Result<()> { ); println!( "NEXT_PUBLIC_DAO_CONTRACT_ADDRESS={}", - orc.contract_map.address("dao_core")? + orc.contract_map.address("dao_dao_core")? ); println!( "NEXT_PUBLIC_V1_FACTORY_CONTRACT_ADDRESS={}", diff --git a/ci/integration-tests/Cargo.toml b/ci/integration-tests/Cargo.toml index fca2adb56..37221c34c 100644 --- a/ci/integration-tests/Cargo.toml +++ b/ci/integration-tests/Cargo.toml @@ -20,7 +20,7 @@ cosmwasm-std = { workspace = true, features = ["ibc3"] } cw-vesting = { workspace = true } cw20-stake = { workspace = true } -dao-core = { workspace = true } +dao-dao-core = { workspace = true } dao-interface = { workspace = true } dao-pre-propose-single = { workspace = true } dao-proposal-single = { workspace = true } diff --git a/ci/integration-tests/README.md b/ci/integration-tests/README.md index b98b821aa..f98024aba 100644 --- a/ci/integration-tests/README.md +++ b/ci/integration-tests/README.md @@ -53,7 +53,7 @@ fn new_dao_has_no_items(chain: &mut Chain) { .orc .query( "cw_core", - &dao_core::msg::QueryMsg::GetItem { + &dao_interface::msg::QueryMsg::GetItem { key: "meme".to_string(), }, ) diff --git a/ci/integration-tests/src/helpers/helper.rs b/ci/integration-tests/src/helpers/helper.rs index 2ec139dff..3c685c22d 100644 --- a/ci/integration-tests/src/helpers/helper.rs +++ b/ci/integration-tests/src/helpers/helper.rs @@ -4,8 +4,8 @@ use cosm_orc::orchestrator::SigningKey; use cosmwasm_std::{to_binary, CosmosMsg, Decimal, Empty, Uint128}; use cw20::Cw20Coin; use cw_utils::Duration; -use dao_core::query::DumpStateResponse; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::query::DumpStateResponse; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use dao_voting::{ deposit::{DepositRefundPolicy, DepositToken, UncheckedDepositInfo}, pre_propose::{PreProposeInfo, ProposalCreationPolicy}, @@ -29,7 +29,7 @@ pub fn create_dao( user_addr: String, key: &SigningKey, ) -> Result { - let msg = dao_core::msg::InstantiateMsg { + let msg = dao_interface::msg::InstantiateMsg { dao_uri: None, admin, name: "DAO DAO".to_string(), @@ -98,14 +98,14 @@ pub fn create_dao( chain .orc - .instantiate("dao_core", op_name, &msg, key, None, vec![])?; + .instantiate("dao_dao_core", op_name, &msg, key, None, vec![])?; // add proposal, pre-propose, voting, cw20_stake, and cw20_base // contracts to the orc contract map. let state: DumpStateResponse = chain .orc - .query("dao_core", &dao_core::msg::QueryMsg::DumpState {})? + .query("dao_dao_core", &dao_interface::msg::QueryMsg::DumpState {})? .data() .unwrap(); chain @@ -169,7 +169,7 @@ pub fn create_dao( .unwrap(); Ok(DaoState { - addr: chain.orc.contract_map.address("dao_core")?, + addr: chain.orc.contract_map.address("dao_dao_core")?, state, }) } diff --git a/ci/integration-tests/src/tests/cw20_stake_test.rs b/ci/integration-tests/src/tests/cw20_stake_test.rs index 09954ff2a..13cb0d226 100644 --- a/ci/integration-tests/src/tests/cw20_stake_test.rs +++ b/ci/integration-tests/src/tests/cw20_stake_test.rs @@ -107,8 +107,8 @@ fn execute_stake_tokens(chain: &mut Chain) { let res = chain .orc .query( - "dao_core", - &dao_core::msg::QueryMsg::VotingPowerAtHeight { + "dao_dao_core", + &dao_interface::msg::QueryMsg::VotingPowerAtHeight { address: user_addr, height: None, }, diff --git a/ci/integration-tests/src/tests/cw_core_test.rs b/ci/integration-tests/src/tests/cw_core_test.rs index 92db63537..348ac3925 100644 --- a/ci/integration-tests/src/tests/cw_core_test.rs +++ b/ci/integration-tests/src/tests/cw_core_test.rs @@ -7,7 +7,7 @@ use cosmwasm_std::{to_binary, Addr, CosmosMsg, Decimal, Uint128}; use cw20_stake::msg::{StakedValueResponse, TotalValueResponse}; use cw_utils::Duration; -use dao_core::query::{GetItemResponse, PauseInfoResponse}; +use dao_interface::query::{GetItemResponse, PauseInfoResponse}; use dao_voting::{ pre_propose::ProposalCreationPolicy, threshold::PercentageThreshold, threshold::Threshold, }; @@ -35,12 +35,12 @@ fn execute_execute_admin_msgs(chain: &mut Chain) { let dao = res.unwrap(); let res = chain.orc.execute( - "dao_core", + "dao_dao_core", "exc_admin_msgs_pause_dao_fail", - &dao_core::msg::ExecuteMsg::ExecuteAdminMsgs { + &dao_interface::msg::ExecuteMsg::ExecuteAdminMsgs { msgs: vec![CosmosMsg::Wasm(cosmwasm_std::WasmMsg::Execute { contract_addr: dao.addr, - msg: to_binary(&dao_core::msg::ExecuteMsg::Pause { + msg: to_binary(&dao_interface::msg::ExecuteMsg::Pause { duration: Duration::Time(100), }) .unwrap(), @@ -55,7 +55,7 @@ fn execute_execute_admin_msgs(chain: &mut Chain) { let res = chain .orc - .query("dao_core", &dao_core::msg::QueryMsg::PauseInfo {}) + .query("dao_dao_core", &dao_interface::msg::QueryMsg::PauseInfo {}) .unwrap(); let res: PauseInfoResponse = res.data().unwrap(); @@ -74,12 +74,12 @@ fn execute_execute_admin_msgs(chain: &mut Chain) { chain .orc .execute( - "dao_core", + "dao_dao_core", "exc_admin_msgs_pause_dao", - &dao_core::msg::ExecuteMsg::ExecuteAdminMsgs { + &dao_interface::msg::ExecuteMsg::ExecuteAdminMsgs { msgs: vec![CosmosMsg::Wasm(cosmwasm_std::WasmMsg::Execute { contract_addr: dao.addr, - msg: to_binary(&dao_core::msg::ExecuteMsg::Pause { + msg: to_binary(&dao_interface::msg::ExecuteMsg::Pause { duration: Duration::Height(100), }) .unwrap(), @@ -93,7 +93,7 @@ fn execute_execute_admin_msgs(chain: &mut Chain) { let res = chain .orc - .query("dao_core", &dao_core::msg::QueryMsg::PauseInfo {}) + .query("dao_dao_core", &dao_interface::msg::QueryMsg::PauseInfo {}) .unwrap(); let res: PauseInfoResponse = res.data().unwrap(); @@ -121,8 +121,8 @@ fn execute_items(chain: &mut Chain) { let res = chain .orc .query( - "dao_core", - &dao_core::msg::QueryMsg::GetItem { + "dao_dao_core", + &dao_interface::msg::QueryMsg::GetItem { key: "meme".to_string(), }, ) @@ -134,12 +134,12 @@ fn execute_items(chain: &mut Chain) { chain .orc .execute( - "dao_core", + "dao_dao_core", "exc_items_set", - &dao_core::msg::ExecuteMsg::ExecuteAdminMsgs { + &dao_interface::msg::ExecuteMsg::ExecuteAdminMsgs { msgs: vec![CosmosMsg::Wasm(cosmwasm_std::WasmMsg::Execute { contract_addr: dao.addr.clone(), - msg: to_binary(&dao_core::msg::ExecuteMsg::SetItem { + msg: to_binary(&dao_interface::msg::ExecuteMsg::SetItem { key: "meme".to_string(), value: "foobar".to_string(), }) @@ -155,8 +155,8 @@ fn execute_items(chain: &mut Chain) { let res = chain .orc .query( - "dao_core", - &dao_core::msg::QueryMsg::GetItem { + "dao_dao_core", + &dao_interface::msg::QueryMsg::GetItem { key: "meme".to_string(), }, ) @@ -169,12 +169,12 @@ fn execute_items(chain: &mut Chain) { chain .orc .execute( - "dao_core", + "dao_dao_core", "exc_items_rm", - &dao_core::msg::ExecuteMsg::ExecuteAdminMsgs { + &dao_interface::msg::ExecuteMsg::ExecuteAdminMsgs { msgs: vec![CosmosMsg::Wasm(cosmwasm_std::WasmMsg::Execute { contract_addr: dao.addr, - msg: to_binary(&dao_core::msg::ExecuteMsg::RemoveItem { + msg: to_binary(&dao_interface::msg::ExecuteMsg::RemoveItem { key: "meme".to_string(), }) .unwrap(), @@ -189,8 +189,8 @@ fn execute_items(chain: &mut Chain) { let res = chain .orc .query( - "dao_core", - &dao_core::msg::QueryMsg::GetItem { + "dao_dao_core", + &dao_interface::msg::QueryMsg::GetItem { key: "meme".to_string(), }, ) @@ -217,7 +217,7 @@ fn instantiate_with_no_admin(chain: &mut Chain) { assert_eq!(dao.state.pause_info, PauseInfoResponse::Unpaused {}); assert_eq!( dao.state.config, - dao_core::state::Config { + dao_interface::state::Config { dao_uri: None, name: "DAO DAO".to_string(), description: "A DAO that makes DAO tooling".to_string(), @@ -251,7 +251,7 @@ fn instantiate_with_admin(chain: &mut Chain) { assert_eq!(dao.state.pause_info, PauseInfoResponse::Unpaused {}); assert_eq!( dao.state.config, - dao_core::state::Config { + dao_interface::state::Config { dao_uri: None, name: "DAO DAO".to_string(), description: "A DAO that makes DAO tooling".to_string(), @@ -310,7 +310,7 @@ fn instantiate_with_admin(chain: &mut Chain) { ownership, cw20_stake::msg::Ownership:: { owner: Some(Addr::unchecked( - chain.orc.contract_map.address("dao_core").unwrap() + chain.orc.contract_map.address("dao_dao_core").unwrap() )), pending_owner: None, pending_expiry: None @@ -377,6 +377,6 @@ fn instantiate_with_admin(chain: &mut Chain) { ); assert_eq!( config_res.dao, - chain.orc.contract_map.address("dao_core").unwrap() + chain.orc.contract_map.address("dao_dao_core").unwrap() ); } diff --git a/ci/integration-tests/src/tests/dao_voting_cw721_staked_test.rs b/ci/integration-tests/src/tests/dao_voting_cw721_staked_test.rs index 620f2d53f..70ef1b96f 100644 --- a/ci/integration-tests/src/tests/dao_voting_cw721_staked_test.rs +++ b/ci/integration-tests/src/tests/dao_voting_cw721_staked_test.rs @@ -1,7 +1,7 @@ use cosm_orc::orchestrator::{ExecReq, SigningKey}; use cosmwasm_std::{Binary, Empty, Uint128}; use cw_utils::Duration; -use dao_interface::Admin; +use dao_interface::state::Admin; use test_context::test_context; use dao_voting_cw721_staked as module; diff --git a/codecov.yml b/codecov.yml index 79d6c7d43..0d88b64a9 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,5 +1,5 @@ ignore: - "ci" - - "packages/dao-macros" + - "packages/dao-dao-macros" - "packages/dao-testing" - "test-contracts" diff --git a/contracts/README.md b/contracts/README.md index cdb9992f7..88c0f6e83 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -1,6 +1,6 @@ # DAO Contracts -- `dao-core` - the core module for DAOs. +- `dao-dao-core` - the core module for DAOs. - `external` - contracts used by DAOs that are not part of a DAO module. - `pre-propose` - pre-propose modules. diff --git a/contracts/dao-core/.cargo/config b/contracts/dao-dao-core/.cargo/config similarity index 100% rename from contracts/dao-core/.cargo/config rename to contracts/dao-dao-core/.cargo/config diff --git a/contracts/dao-core/.gitignore b/contracts/dao-dao-core/.gitignore similarity index 100% rename from contracts/dao-core/.gitignore rename to contracts/dao-dao-core/.gitignore diff --git a/contracts/dao-core/Cargo.toml b/contracts/dao-dao-core/Cargo.toml similarity index 91% rename from contracts/dao-core/Cargo.toml rename to contracts/dao-dao-core/Cargo.toml index 93ecdc7b7..ac8e2060d 100644 --- a/contracts/dao-core/Cargo.toml +++ b/contracts/dao-dao-core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "dao-core" +name = "dao-dao-core" authors = ["ekez "] description = "A DAO DAO core module." edition = { workspace = true } @@ -26,8 +26,8 @@ cw20 = { workspace = true } cw721 = { workspace = true } thiserror = { workspace = true } dao-interface = { workspace = true } -dao-macros = { workspace = true } -cw-paginate = { workspace = true } +dao-dao-macros = { workspace = true } +cw-paginate-storage = { workspace = true } cw-core-v1 = { workspace = true, features = ["library"] } [dev-dependencies] diff --git a/contracts/dao-core/README.md b/contracts/dao-dao-core/README.md similarity index 90% rename from contracts/dao-core/README.md rename to contracts/dao-dao-core/README.md index fa3485001..148b1e0ef 100644 --- a/contracts/dao-core/README.md +++ b/contracts/dao-dao-core/README.md @@ -1,4 +1,4 @@ -# dao-core +# dao-dao-core This contract is the core module for all DAO DAO DAOs. It handles management of voting power and proposal modules, executes messages, @@ -12,6 +12,9 @@ In addition to the wiki spec this contract may also pause. To do so a core module will stop all actions on the module for the duration of the pause. +## Developing +Core messages and interfaces are defined in the [dao-interfaces](../../packages/dao-interface) package. If you are building new modules or a contract that interacts with a DAO, use `dao-interface`. + ## Treasury management For management of non-native assets this contract maintains a list of @@ -37,7 +40,7 @@ There are two ways that a non-native token may be added to the DAO treasury. If `automatically_add_[cw20s|cw721s]` is set to true in the [DAO's -config](https://github.com/DA0-DA0/dao-contracts/blob/74bd3881fdd86829e5e8b132b9952dd64f2d0737/contracts/dao-core/src/state.rs#L16-L21), +config](https://github.com/DA0-DA0/dao-contracts/blob/74bd3881fdd86829e5e8b132b9952dd64f2d0737/contracts/dao-dao/src/state.rs#L16-L21), the DAO will add the token to the treasury upon receiving the token via cw20's `Send` method and cw721's `SendNft` method. diff --git a/contracts/dao-core/examples/schema.rs b/contracts/dao-dao-core/examples/schema.rs similarity index 71% rename from contracts/dao-core/examples/schema.rs rename to contracts/dao-dao-core/examples/schema.rs index 478c750b1..419bd675d 100644 --- a/contracts/dao-core/examples/schema.rs +++ b/contracts/dao-dao-core/examples/schema.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::write_api; -use dao_core::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; +use dao_interface::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; fn main() { write_api! { diff --git a/contracts/dao-core/schema/dao-core.json b/contracts/dao-dao-core/schema/dao-dao-core.json similarity index 99% rename from contracts/dao-core/schema/dao-core.json rename to contracts/dao-dao-core/schema/dao-dao-core.json index eebaea5c4..fec05f159 100644 --- a/contracts/dao-core/schema/dao-core.json +++ b/contracts/dao-dao-core/schema/dao-dao-core.json @@ -1,6 +1,6 @@ { - "contract_name": "dao-core", - "contract_version": "2.1.0", + "contract_name": "dao-dao-core", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/dao-core/src/contract.rs b/contracts/dao-dao-core/src/contract.rs similarity index 97% rename from contracts/dao-core/src/contract.rs rename to contracts/dao-dao-core/src/contract.rs index 8a0d9974d..97f3a7d3e 100644 --- a/contracts/dao-core/src/contract.rs +++ b/contracts/dao-dao-core/src/contract.rs @@ -5,25 +5,29 @@ use cosmwasm_std::{ Reply, Response, StdError, StdResult, SubMsg, WasmMsg, }; use cw2::{get_contract_version, set_contract_version, ContractVersion}; +use cw_paginate_storage::{paginate_map, paginate_map_keys, paginate_map_values}; use cw_storage_plus::Map; use cw_utils::{parse_reply_instantiate_data, Duration}; - -use cw_paginate::{paginate_map, paginate_map_keys, paginate_map_values}; -use dao_interface::{voting, Admin, ModuleInstantiateCallback, ModuleInstantiateInfo}; +use dao_interface::{ + msg::{ExecuteMsg, InitialItem, InstantiateMsg, MigrateMsg, QueryMsg}, + query::{ + AdminNominationResponse, Cw20BalanceResponse, DaoURIResponse, DumpStateResponse, + GetItemResponse, PauseInfoResponse, ProposalModuleCountResponse, SubDao, + }, + state::{ + Admin, Config, ModuleInstantiateCallback, ModuleInstantiateInfo, ProposalModule, + ProposalModuleStatus, + }, + voting, +}; use crate::error::ContractError; -use crate::msg::{ExecuteMsg, InitialItem, InstantiateMsg, MigrateMsg, QueryMsg}; -use crate::query::{ - AdminNominationResponse, Cw20BalanceResponse, DaoURIResponse, DumpStateResponse, - GetItemResponse, PauseInfoResponse, ProposalModuleCountResponse, SubDao, -}; use crate::state::{ - Config, ProposalModule, ProposalModuleStatus, ACTIVE_PROPOSAL_MODULE_COUNT, ADMIN, CONFIG, - CW20_LIST, CW721_LIST, ITEMS, NOMINATED_ADMIN, PAUSED, PROPOSAL_MODULES, SUBDAO_LIST, - TOTAL_PROPOSAL_MODULE_COUNT, VOTING_MODULE, + ACTIVE_PROPOSAL_MODULE_COUNT, ADMIN, CONFIG, CW20_LIST, CW721_LIST, ITEMS, NOMINATED_ADMIN, + PAUSED, PROPOSAL_MODULES, SUBDAO_LIST, TOTAL_PROPOSAL_MODULE_COUNT, VOTING_MODULE, }; -pub(crate) const CONTRACT_NAME: &str = "crates.io:dao-core"; +pub(crate) const CONTRACT_NAME: &str = "crates.io:dao-dao-core"; pub(crate) const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); const PROPOSAL_MODULE_REPLY_ID: u64 = 0; @@ -810,7 +814,7 @@ pub fn query_list_sub_daos( .map(|addr| deps.api.addr_validate(&addr)) .transpose()?; - let subdaos = cw_paginate::paginate_map( + let subdaos = cw_paginate_storage::paginate_map( deps, &SUBDAO_LIST, start_at.as_ref(), diff --git a/contracts/dao-core/src/error.rs b/contracts/dao-dao-core/src/error.rs similarity index 100% rename from contracts/dao-core/src/error.rs rename to contracts/dao-dao-core/src/error.rs diff --git a/contracts/dao-core/src/lib.rs b/contracts/dao-dao-core/src/lib.rs similarity index 78% rename from contracts/dao-core/src/lib.rs rename to contracts/dao-dao-core/src/lib.rs index aa6c8d18e..20a9a57d7 100644 --- a/contracts/dao-core/src/lib.rs +++ b/contracts/dao-dao-core/src/lib.rs @@ -2,9 +2,6 @@ pub mod contract; mod error; -pub mod migrate_msg; -pub mod msg; -pub mod query; pub mod state; #[cfg(test)] diff --git a/contracts/dao-core/src/msg.rs b/contracts/dao-dao-core/src/msg.rs similarity index 100% rename from contracts/dao-core/src/msg.rs rename to contracts/dao-dao-core/src/msg.rs diff --git a/contracts/dao-core/src/state.rs b/contracts/dao-dao-core/src/state.rs similarity index 65% rename from contracts/dao-core/src/state.rs rename to contracts/dao-dao-core/src/state.rs index b0e8859fb..cd9e6198d 100644 --- a/contracts/dao-core/src/state.rs +++ b/contracts/dao-dao-core/src/state.rs @@ -1,47 +1,7 @@ -use cosmwasm_schema::cw_serde; -use cw_utils::Expiration; - use cosmwasm_std::{Addr, Empty}; use cw_storage_plus::{Item, Map}; - -/// Top level config type for core module. -#[cw_serde] -pub struct Config { - /// The name of the contract. - pub name: String, - /// A description of the contract. - pub description: String, - /// An optional image URL for displaying alongside the contract. - pub image_url: Option, - /// If true the contract will automatically add received cw20 - /// tokens to its treasury. - pub automatically_add_cw20s: bool, - /// If true the contract will automatically add received cw721 - /// tokens to its treasury. - pub automatically_add_cw721s: bool, - /// The URI for the DAO as defined by the DAOstar standard - /// - pub dao_uri: Option, -} - -/// Top level type describing a proposal module. -#[cw_serde] -pub struct ProposalModule { - /// The address of the proposal module. - pub address: Addr, - /// The URL prefix of this proposal module as derived from the module ID. - /// Prefixes are mapped to letters, e.g. 0 is 'A', and 26 is 'AA'. - pub prefix: String, - /// The status of the proposal module, e.g. 'Enabled' or 'Disabled.' - pub status: ProposalModuleStatus, -} - -/// The status of a proposal module. -#[cw_serde] -pub enum ProposalModuleStatus { - Enabled, - Disabled, -} +use cw_utils::Expiration; +use dao_interface::state::{Config, ProposalModule}; /// The admin of the contract. Typically a DAO. The contract admin may /// unilaterally execute messages on this contract. diff --git a/contracts/dao-core/src/tests.rs b/contracts/dao-dao-core/src/tests.rs similarity index 99% rename from contracts/dao-core/src/tests.rs rename to contracts/dao-dao-core/src/tests.rs index 006dcd0c1..f2da5064d 100644 --- a/contracts/dao-core/src/tests.rs +++ b/contracts/dao-dao-core/src/tests.rs @@ -9,18 +9,18 @@ use cw_multi_test::{App, Contract, ContractWrapper, Executor}; use cw_storage_plus::{Item, Map}; use cw_utils::{Duration, Expiration}; use dao_interface::{ - voting::{InfoResponse, VotingPowerAtHeightResponse}, - Admin, ModuleInstantiateInfo, -}; - -use crate::{ - contract::{derive_proposal_module_prefix, migrate, CONTRACT_NAME, CONTRACT_VERSION}, msg::{ExecuteMsg, InitialItem, InstantiateMsg, MigrateMsg, QueryMsg}, query::{ AdminNominationResponse, Cw20BalanceResponse, DaoURIResponse, DumpStateResponse, GetItemResponse, PauseInfoResponse, ProposalModuleCountResponse, SubDao, }, - state::{Config, ProposalModule, ProposalModuleStatus, PROPOSAL_MODULES}, + state::{Admin, Config, ModuleInstantiateInfo, ProposalModule, ProposalModuleStatus}, + voting::{InfoResponse, VotingPowerAtHeightResponse}, +}; + +use crate::{ + contract::{derive_proposal_module_prefix, migrate, CONTRACT_NAME, CONTRACT_VERSION}, + state::PROPOSAL_MODULES, ContractError, }; diff --git a/contracts/external/cw-admin-factory/Cargo.toml b/contracts/external/cw-admin-factory/Cargo.toml index 68716219b..b22399df8 100644 --- a/contracts/external/cw-admin-factory/Cargo.toml +++ b/contracts/external/cw-admin-factory/Cargo.toml @@ -28,6 +28,6 @@ cw-utils = { workspace = true } [dev-dependencies] cosmwasm-schema = { workspace = true } cw-multi-test = { workspace = true } -dao-core = { workspace = true, features = ["library"] } +dao-dao-core = { workspace = true, features = ["library"] } dao-interface = { workspace = true } cw20-base = { workspace = true, features = ["library"] } diff --git a/contracts/external/cw-admin-factory/schema/cw-admin-factory.json b/contracts/external/cw-admin-factory/schema/cw-admin-factory.json index ebfcab664..67c92d629 100644 --- a/contracts/external/cw-admin-factory/schema/cw-admin-factory.json +++ b/contracts/external/cw-admin-factory/schema/cw-admin-factory.json @@ -1,6 +1,6 @@ { "contract_name": "cw-admin-factory", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/external/cw-admin-factory/src/tests.rs b/contracts/external/cw-admin-factory/src/tests.rs index 79f43b1b8..226d1f1ef 100644 --- a/contracts/external/cw-admin-factory/src/tests.rs +++ b/contracts/external/cw-admin-factory/src/tests.rs @@ -6,7 +6,7 @@ use cosmwasm_std::{ }; use cw_multi_test::{App, AppResponse, Contract, ContractWrapper, Executor}; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use crate::{ contract::instantiate, @@ -35,12 +35,12 @@ fn cw20_contract() -> Box> { fn cw_core_contract() -> Box> { let contract = ContractWrapper::new( - dao_core::contract::execute, - dao_core::contract::instantiate, - dao_core::contract::query, + dao_dao_core::contract::execute, + dao_dao_core::contract::instantiate, + dao_dao_core::contract::query, ) - .with_reply(dao_core::contract::reply) - .with_migrate(dao_core::contract::migrate); + .with_reply(dao_dao_core::contract::reply) + .with_migrate(dao_dao_core::contract::migrate); Box::new(contract) } @@ -72,7 +72,7 @@ pub fn test_set_admin() { // Instantiate core contract using factory. let cw_core_code_id = app.store_code(cw_core_contract()); - let instantiate_core = dao_core::msg::InstantiateMsg { + let instantiate_core = dao_interface::msg::InstantiateMsg { dao_uri: None, admin: None, name: "DAO DAO".to_string(), diff --git a/contracts/external/cw-fund-distributor/Cargo.toml b/contracts/external/cw-fund-distributor/Cargo.toml index 80023bd55..558478ae3 100644 --- a/contracts/external/cw-fund-distributor/Cargo.toml +++ b/contracts/external/cw-fund-distributor/Cargo.toml @@ -3,6 +3,7 @@ name = "cw-fund-distributor" authors = ["bekauz "] description = "A CosmWasm contract for distributing funds to DAO members based on voting power." edition = { workspace = true } +license = { workspace = true } repository = { workspace = true } version = "0.1.0" @@ -26,9 +27,9 @@ cw-utils = { workspace = true } dao-voting-cw20-staked = { workspace = true } cw20-stake = { workspace = true, features = ["library"] } dao-interface = { workspace = true } -cw-paginate = { workspace = true } +cw-paginate-storage = { workspace = true } [dev-dependencies] -dao-core = { workspace = true, features = ["library"] } +dao-dao-core = { workspace = true, features = ["library"] } cw-multi-test = { workspace = true } cw20-base = { workspace = true, features = ["library"] } diff --git a/contracts/external/cw-fund-distributor/src/contract.rs b/contracts/external/cw-fund-distributor/src/contract.rs index 0706d9f6f..2e5d4b2d1 100644 --- a/contracts/external/cw-fund-distributor/src/contract.rs +++ b/contracts/external/cw-fund-distributor/src/contract.rs @@ -14,7 +14,7 @@ use cosmwasm_std::{ Order, Response, StdError, StdResult, Uint128, WasmMsg, }; use cw2::set_contract_version; -use cw_paginate::paginate_map; +use cw_paginate_storage::paginate_map; use dao_interface::voting; diff --git a/contracts/external/cw-payroll-factory/Cargo.toml b/contracts/external/cw-payroll-factory/Cargo.toml index db539643d..9b89969a5 100644 --- a/contracts/external/cw-payroll-factory/Cargo.toml +++ b/contracts/external/cw-payroll-factory/Cargo.toml @@ -3,6 +3,7 @@ name ="cw-payroll-factory" authors = ["Jake Hartnell"] description = "A CosmWasm factory contract for instantiating a payroll contract." edition = { workspace = true } +license = { workspace = true } repository = { workspace = true } version = { workspace = true } diff --git a/contracts/external/cw-payroll-factory/schema/cw-payroll-factory.json b/contracts/external/cw-payroll-factory/schema/cw-payroll-factory.json index c0bb31100..f8faac397 100644 --- a/contracts/external/cw-payroll-factory/schema/cw-payroll-factory.json +++ b/contracts/external/cw-payroll-factory/schema/cw-payroll-factory.json @@ -1,6 +1,6 @@ { "contract_name": "cw-payroll-factory", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/external/cw-token-swap/schema/cw-token-swap.json b/contracts/external/cw-token-swap/schema/cw-token-swap.json index b232d25d2..dd0400086 100644 --- a/contracts/external/cw-token-swap/schema/cw-token-swap.json +++ b/contracts/external/cw-token-swap/schema/cw-token-swap.json @@ -1,6 +1,6 @@ { "contract_name": "cw-token-swap", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/external/cw-vesting/Cargo.toml b/contracts/external/cw-vesting/Cargo.toml index deafe7e68..039d37d49 100644 --- a/contracts/external/cw-vesting/Cargo.toml +++ b/contracts/external/cw-vesting/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "cw-vesting" authors = ["Jake Hartnell", "ekez ", "blue-note"] +description = "A CosmWasm vesting contract." edition = { workspace = true } license = { workspace = true } repository = { workspace = true } @@ -20,7 +21,7 @@ cosmwasm-schema = { workspace = true } cosmwasm-std = { workspace = true, features = ["staking"] } cw-denom = { workspace = true } cw-ownable = { workspace = true } -cw-paginate = { workspace = true } +cw-paginate-storage = { workspace = true } cw-stake-tracker = { workspace = true } cw-storage-plus = { workspace = true } cw-utils = { workspace = true } diff --git a/contracts/external/cw-vesting/schema/cw-vesting.json b/contracts/external/cw-vesting/schema/cw-vesting.json index b3c71e4f8..aa6b2aa8b 100644 --- a/contracts/external/cw-vesting/schema/cw-vesting.json +++ b/contracts/external/cw-vesting/schema/cw-vesting.json @@ -1,6 +1,6 @@ { "contract_name": "cw-vesting", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/external/dao-migrator/Cargo.toml b/contracts/external/dao-migrator/Cargo.toml index 2bd3f5208..346ec7f6f 100644 --- a/contracts/external/dao-migrator/Cargo.toml +++ b/contracts/external/dao-migrator/Cargo.toml @@ -1,10 +1,11 @@ [package] name = "dao-migrator" -version = "2.0.2" authors = ["Art3mix "] -edition = "2021" -repository = "https://github.com/DA0-DA0/dao-contracts" description = "A DAO DAO migrator module for modules." +edition = { workspace = true } +license = { workspace = true } +repository = { workspace = true } +version = { workspace = true } [lib] crate-type = ["cdylib", "rlib"] @@ -25,7 +26,7 @@ cw2 = { workspace = true } cw20 = { workspace = true } dao-interface = { workspace = true } -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"] } @@ -48,4 +49,4 @@ cw4-v1 = { version = "0.13", package = "cw4" } cosmwasm-schema = { workspace = true } cw-multi-test = { workspace = true } dao-testing = { workspace = true } -anyhow = { workspace = true } \ No newline at end of file +anyhow = { workspace = true } diff --git a/contracts/external/dao-migrator/schema/dao-migrator.json b/contracts/external/dao-migrator/schema/dao-migrator.json index 83713819a..81e796ddd 100644 --- a/contracts/external/dao-migrator/schema/dao-migrator.json +++ b/contracts/external/dao-migrator/schema/dao-migrator.json @@ -1,6 +1,6 @@ { "contract_name": "dao-migrator", - "contract_version": "2.0.2", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/external/dao-migrator/src/contract.rs b/contracts/external/dao-migrator/src/contract.rs index 86cd18ed8..ae91152d5 100644 --- a/contracts/external/dao-migrator/src/contract.rs +++ b/contracts/external/dao-migrator/src/contract.rs @@ -7,8 +7,10 @@ use cosmwasm_std::{ StdResult, SubMsg, WasmMsg, }; use cw2::set_contract_version; -use dao_core::{query::SubDao, state::ProposalModule}; -use dao_interface::ModuleInstantiateCallback; +use dao_interface::{ + query::SubDao, + state::{ModuleInstantiateCallback, ProposalModule}, +}; use crate::{ error::ContractError, @@ -145,7 +147,7 @@ fn execute_migration_v1_v2( // -------------------- let voting_module: Addr = deps.querier.query_wasm_smart( info.sender.clone(), - &dao_core::msg::QueryMsg::VotingModule {}, + &dao_interface::msg::QueryMsg::VotingModule {}, )?; let voting_code_id = @@ -225,7 +227,7 @@ fn execute_migration_v1_v2( // We take all the proposal modules of the DAO. let proposal_modules: Vec = deps.querier.query_wasm_smart( info.sender.clone(), - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, @@ -303,7 +305,7 @@ fn execute_migration_v1_v2( msgs.push( WasmMsg::Execute { contract_addr: info.sender.to_string(), - msg: to_binary(&dao_core::msg::ExecuteMsg::UpdateSubDaos { + msg: to_binary(&dao_interface::msg::ExecuteMsg::UpdateSubDaos { to_add: sub_daos, to_remove: vec![], })?, @@ -316,7 +318,7 @@ fn execute_migration_v1_v2( let proposal_hook_msg = SubMsg::reply_on_success( WasmMsg::Execute { contract_addr: info.sender.to_string(), - msg: to_binary(&dao_core::msg::ExecuteMsg::ExecuteProposalHook { msgs })?, + msg: to_binary(&dao_interface::msg::ExecuteMsg::ExecuteProposalHook { msgs })?, funds: vec![], }, V1_V2_REPLY_ID, @@ -343,10 +345,10 @@ pub fn reply(deps: DepsMut, env: Env, reply: Reply) -> Result (CodeIds, V1CodeIds) { let code_ids = CodeIds { - core: app.store_code(v1_dao_core_contract()), + core: app.store_code(v1_dao_dao_contract()), proposal_single: app.store_code(v1_proposal_single_contract()), cw20_base: app.store_code(cw20_base_contract()), cw20_stake: app.store_code(v1_cw20_stake_contract()), @@ -70,7 +70,7 @@ pub fn get_v1_code_ids(app: &mut App) -> (CodeIds, V1CodeIds) { pub fn get_v2_code_ids(app: &mut App) -> (CodeIds, V2CodeIds) { let code_ids = CodeIds { - core: app.store_code(dao_core_contract()), + core: app.store_code(dao_dao_contract()), proposal_single: app.store_code(proposal_single_contract()), cw20_base: app.store_code(cw20_base_contract()), cw20_stake: app.store_code(v2_cw20_stake_contract()), diff --git a/contracts/external/dao-migrator/src/testing/setup.rs b/contracts/external/dao-migrator/src/testing/setup.rs index fd6c78717..b9d93950e 100644 --- a/contracts/external/dao-migrator/src/testing/setup.rs +++ b/contracts/external/dao-migrator/src/testing/setup.rs @@ -2,7 +2,7 @@ use std::borrow::BorrowMut; use cosmwasm_std::{to_binary, Addr, WasmMsg}; use cw_multi_test::{next_block, App, AppResponse, Executor}; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use dao_testing::contracts::stake_cw20_v03_contract; use crate::{ @@ -291,7 +291,7 @@ pub fn execute_migration( WasmMsg::Migrate { contract_addr: module_addrs.core.to_string(), new_code_id: new_code_ids.core, - msg: to_binary(&dao_core::msg::MigrateMsg::FromV1 { + msg: to_binary(&dao_interface::msg::MigrateMsg::FromV1 { dao_uri: None, params: None, }) @@ -300,7 +300,7 @@ pub fn execute_migration( .into(), WasmMsg::Execute { contract_addr: module_addrs.core.to_string(), - msg: to_binary(&dao_core::msg::ExecuteMsg::UpdateProposalModules { + msg: to_binary(&dao_interface::msg::ExecuteMsg::UpdateProposalModules { to_add: vec![ModuleInstantiateInfo { code_id: migrator_code_id, msg: to_binary(&crate::msg::InstantiateMsg { @@ -379,13 +379,14 @@ pub fn execute_migration_from_core( .map(|addr| { ( addr.clone().into(), - dao_core::migrate_msg::ProposalParams { + dao_interface::migrate_msg::ProposalParams { close_proposal_on_execution_failure: true, - pre_propose_info: dao_core::migrate_msg::PreProposeInfo::AnyoneMayPropose {}, + pre_propose_info: + dao_interface::migrate_msg::PreProposeInfo::AnyoneMayPropose {}, }, ) }) - .collect::>(); + .collect::>(); app.execute_contract( sender.clone(), @@ -396,13 +397,13 @@ pub fn execute_migration_from_core( msgs: vec![WasmMsg::Migrate { contract_addr: module_addrs.core.to_string(), new_code_id: new_code_ids.core, - msg: to_binary(&dao_core::msg::MigrateMsg::FromV1 { + msg: to_binary(&dao_interface::msg::MigrateMsg::FromV1 { dao_uri: None, - params: Some(dao_core::migrate_msg::MigrateParams { + params: Some(dao_interface::migrate_msg::MigrateParams { migrator_code_id, - params: dao_core::migrate_msg::MigrateV1ToV2 { + params: dao_interface::migrate_msg::MigrateV1ToV2 { sub_daos: params.sub_daos.unwrap(), - migration_params: dao_core::migrate_msg::MigrationModuleParams { + migration_params: dao_interface::migrate_msg::MigrationModuleParams { migrate_stake_cw20_manager: params.migrate_cw20, proposal_params, }, diff --git a/contracts/external/dao-migrator/src/testing/test_migration.rs b/contracts/external/dao-migrator/src/testing/test_migration.rs index ee50a684b..cf936f7e4 100644 --- a/contracts/external/dao-migrator/src/testing/test_migration.rs +++ b/contracts/external/dao-migrator/src/testing/test_migration.rs @@ -2,7 +2,7 @@ use std::borrow::BorrowMut; use cosmwasm_std::Addr; use cw_multi_test::Executor; -use dao_core::{query::SubDao, state::ProposalModuleStatus}; +use dao_interface::{query::SubDao, state::ProposalModuleStatus}; use crate::{ testing::{ @@ -71,11 +71,11 @@ pub fn basic_test(voting_type: VotingType, from_core: bool) { assert_eq!(test_state_v1, test_state_v2); - let modules: Vec = app + let modules: Vec = app .wrap() .query_wasm_smart( module_addrs.core, - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, @@ -139,11 +139,11 @@ fn test_migrator_address_is_first() { assert_eq!(test_state_v1, test_state_v2); - let modules: Vec = app + let modules: Vec = app .wrap() .query_wasm_smart( module_addrs.core, - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, @@ -348,11 +348,11 @@ fn test_sub_daos() { ) .unwrap(); - let sub_daos: Vec = app + let sub_daos: Vec = app .wrap() .query_wasm_smart( module_addrs.core, - &dao_core::msg::QueryMsg::ListSubDaos { + &dao_interface::msg::QueryMsg::ListSubDaos { start_after: None, limit: None, }, diff --git a/contracts/external/dao-migrator/src/types.rs b/contracts/external/dao-migrator/src/types.rs index 428bb4e45..837ca736e 100644 --- a/contracts/external/dao-migrator/src/types.rs +++ b/contracts/external/dao-migrator/src/types.rs @@ -12,8 +12,8 @@ pub struct V1CodeIds { } impl V1CodeIds { - pub fn to(self) -> dao_core::migrate_msg::V1CodeIds { - dao_core::migrate_msg::V1CodeIds { + pub fn to(self) -> dao_interface::migrate_msg::V1CodeIds { + dao_interface::migrate_msg::V1CodeIds { proposal_single: self.proposal_single, cw4_voting: self.cw4_voting, cw20_stake: self.cw20_stake, @@ -31,8 +31,8 @@ pub struct V2CodeIds { } impl V2CodeIds { - pub fn to(self) -> dao_core::migrate_msg::V2CodeIds { - dao_core::migrate_msg::V2CodeIds { + pub fn to(self) -> dao_interface::migrate_msg::V2CodeIds { + dao_interface::migrate_msg::V2CodeIds { proposal_single: self.proposal_single, cw4_voting: self.cw4_voting, cw20_stake: self.cw20_stake, diff --git a/contracts/pre-propose/dao-pre-propose-approval-single/Cargo.toml b/contracts/pre-propose/dao-pre-propose-approval-single/Cargo.toml index d33aa8a3d..659b2d7d7 100644 --- a/contracts/pre-propose/dao-pre-propose-approval-single/Cargo.toml +++ b/contracts/pre-propose/dao-pre-propose-approval-single/Cargo.toml @@ -21,7 +21,7 @@ cosmwasm-std = { workspace = true } cosmwasm-schema = { workspace = true } cw-storage-plus = { workspace = true } cw2 = { workspace = true } -cw-paginate = { workspace = true } +cw-paginate-storage = { workspace = true } dao-pre-propose-base = { workspace = true } dao-voting = { workspace = true } thiserror = { workspace = true } @@ -34,7 +34,7 @@ cw-utils = { workspace = true } cw4-group = { workspace = true } cw20 = { workspace = true } cw20-base = { workspace = true } -dao-core = { workspace = true } +dao-dao-core = { workspace = true } dao-proposal-hooks = { workspace = true } dao-testing = { workspace = true } dao-voting = { workspace = true } diff --git a/contracts/pre-propose/dao-pre-propose-approval-single/schema/dao-pre-propose-approval-single.json b/contracts/pre-propose/dao-pre-propose-approval-single/schema/dao-pre-propose-approval-single.json index 70c90c57c..c11084723 100644 --- a/contracts/pre-propose/dao-pre-propose-approval-single/schema/dao-pre-propose-approval-single.json +++ b/contracts/pre-propose/dao-pre-propose-approval-single/schema/dao-pre-propose-approval-single.json @@ -1,6 +1,6 @@ { "contract_name": "dao-pre-propose-approval-single", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", @@ -88,7 +88,7 @@ "additionalProperties": false }, { - "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", + "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", "type": "object", "required": [ "voting_module_token" @@ -609,7 +609,7 @@ "additionalProperties": false }, { - "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", + "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", "type": "object", "required": [ "voting_module_token" @@ -1395,7 +1395,7 @@ "additionalProperties": false }, { - "description": "Gets the DAO (cw-dao-core) module this contract is associated with. Returns `Addr`.", + "description": "Gets the DAO (dao-dao-core) module this contract is associated with. Returns `Addr`.", "type": "object", "required": [ "dao" diff --git a/contracts/pre-propose/dao-pre-propose-approval-single/src/contract.rs b/contracts/pre-propose/dao-pre-propose-approval-single/src/contract.rs index 4400807d2..a0ad2b764 100644 --- a/contracts/pre-propose/dao-pre-propose-approval-single/src/contract.rs +++ b/contracts/pre-propose/dao-pre-propose-approval-single/src/contract.rs @@ -5,7 +5,7 @@ use cosmwasm_std::{ WasmMsg, }; use cw2::set_contract_version; -use cw_paginate::paginate_map_values; +use cw_paginate_storage::paginate_map_values; use dao_pre_propose_base::{ error::PreProposeError, msg::ExecuteMsg as ExecuteBase, state::PreProposeContract, }; diff --git a/contracts/pre-propose/dao-pre-propose-approval-single/src/tests.rs b/contracts/pre-propose/dao-pre-propose-approval-single/src/tests.rs index 3e818af72..2127cebf5 100644 --- a/contracts/pre-propose/dao-pre-propose-approval-single/src/tests.rs +++ b/contracts/pre-propose/dao-pre-propose-approval-single/src/tests.rs @@ -4,8 +4,8 @@ use cw20::Cw20Coin; use cw_denom::UncheckedDenom; use cw_multi_test::{App, BankSudo, Contract, ContractWrapper, Executor}; use cw_utils::Duration; -use dao_core::state::ProposalModule; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::state::ProposalModule; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use dao_pre_propose_base::{error::PreProposeError, msg::DepositInfoResponse, state::Config}; use dao_proposal_single::query::ProposalResponse; use dao_testing::helpers::instantiate_with_cw4_groups_governance; @@ -137,7 +137,7 @@ fn setup_default_test( .wrap() .query_wasm_smart( core_addr.clone(), - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, diff --git a/contracts/pre-propose/dao-pre-propose-approver/Cargo.toml b/contracts/pre-propose/dao-pre-propose-approver/Cargo.toml index 7eb419fa7..05bc50642 100644 --- a/contracts/pre-propose/dao-pre-propose-approver/Cargo.toml +++ b/contracts/pre-propose/dao-pre-propose-approver/Cargo.toml @@ -34,7 +34,7 @@ cw-utils = { workspace = true } cw4-group = { workspace = true } cw20 = { workspace = true } cw20-base = { workspace = true } -dao-core = { workspace = true } +dao-dao-core = { workspace = true } dao-proposal-hooks = { workspace = true } dao-proposal-single = { workspace = true, features = ["library"] } dao-testing = { workspace = true } diff --git a/contracts/pre-propose/dao-pre-propose-approver/schema/dao-pre-propose-approver.json b/contracts/pre-propose/dao-pre-propose-approver/schema/dao-pre-propose-approver.json index 159930e6f..dafcc738c 100644 --- a/contracts/pre-propose/dao-pre-propose-approver/schema/dao-pre-propose-approver.json +++ b/contracts/pre-propose/dao-pre-propose-approver/schema/dao-pre-propose-approver.json @@ -1,6 +1,6 @@ { "contract_name": "dao-pre-propose-approver", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", @@ -283,7 +283,7 @@ "additionalProperties": false }, { - "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", + "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", "type": "object", "required": [ "voting_module_token" @@ -440,7 +440,7 @@ "additionalProperties": false }, { - "description": "Gets the DAO (cw-dao-core) module this contract is associated with. Returns `Addr`.", + "description": "Gets the DAO (dao-dao-core) module this contract is associated with. Returns `Addr`.", "type": "object", "required": [ "dao" diff --git a/contracts/pre-propose/dao-pre-propose-approver/src/contract.rs b/contracts/pre-propose/dao-pre-propose-approver/src/contract.rs index 2548be9df..c1e52ecd3 100644 --- a/contracts/pre-propose/dao-pre-propose-approver/src/contract.rs +++ b/contracts/pre-propose/dao-pre-propose-approver/src/contract.rs @@ -6,7 +6,7 @@ use cosmwasm_std::{ }; use cw2::set_contract_version; -use dao_interface::ModuleInstantiateCallback; +use dao_interface::state::ModuleInstantiateCallback; use dao_pre_propose_approval_single::msg::{ ApproverProposeMessage, ExecuteExt as ApprovalExt, ExecuteMsg as PreProposeApprovalExecuteMsg, }; diff --git a/contracts/pre-propose/dao-pre-propose-approver/src/tests.rs b/contracts/pre-propose/dao-pre-propose-approver/src/tests.rs index 0afc6b27c..5aea7b2bc 100644 --- a/contracts/pre-propose/dao-pre-propose-approver/src/tests.rs +++ b/contracts/pre-propose/dao-pre-propose-approver/src/tests.rs @@ -5,8 +5,8 @@ use cw20::Cw20Coin; use cw_denom::UncheckedDenom; use cw_multi_test::{App, BankSudo, Contract, ContractWrapper, Executor}; -use dao_core::state::ProposalModule; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::state::ProposalModule; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use dao_pre_propose_approval_single::{ msg::{ ExecuteExt, ExecuteMsg, InstantiateExt, InstantiateMsg, ProposeMessage, QueryExt, QueryMsg, @@ -198,7 +198,7 @@ fn setup_default_test( .wrap() .query_wasm_smart( core_addr.clone(), - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, @@ -252,7 +252,7 @@ fn setup_default_test( .wrap() .query_wasm_smart( _approver_core_addr.clone(), - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, diff --git a/contracts/pre-propose/dao-pre-propose-multiple/Cargo.toml b/contracts/pre-propose/dao-pre-propose-multiple/Cargo.toml index f5d404cca..7352139b4 100644 --- a/contracts/pre-propose/dao-pre-propose-multiple/Cargo.toml +++ b/contracts/pre-propose/dao-pre-propose-multiple/Cargo.toml @@ -31,7 +31,7 @@ cw20 = { workspace = true } cw20-base = { workspace = true } dao-voting-cw20-staked = { workspace = true } dao-proposal-multiple = { workspace = true } -dao-core = { workspace = true } +dao-dao-core = { workspace = true } dao-voting-cw4 = { workspace = true } dao-voting = { workspace = true } cw-denom = { workspace = true } diff --git a/contracts/pre-propose/dao-pre-propose-multiple/schema/dao-pre-propose-multiple.json b/contracts/pre-propose/dao-pre-propose-multiple/schema/dao-pre-propose-multiple.json index b72d17e18..d0fb4ab83 100644 --- a/contracts/pre-propose/dao-pre-propose-multiple/schema/dao-pre-propose-multiple.json +++ b/contracts/pre-propose/dao-pre-propose-multiple/schema/dao-pre-propose-multiple.json @@ -1,6 +1,6 @@ { "contract_name": "dao-pre-propose-multiple", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", @@ -88,7 +88,7 @@ "additionalProperties": false }, { - "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", + "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", "type": "object", "required": [ "voting_module_token" @@ -601,7 +601,7 @@ "additionalProperties": false }, { - "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", + "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", "type": "object", "required": [ "voting_module_token" @@ -1350,7 +1350,7 @@ "additionalProperties": false }, { - "description": "Gets the DAO (cw-dao-core) module this contract is associated with. Returns `Addr`.", + "description": "Gets the DAO (dao-dao-core) module this contract is associated with. Returns `Addr`.", "type": "object", "required": [ "dao" diff --git a/contracts/pre-propose/dao-pre-propose-multiple/src/tests.rs b/contracts/pre-propose/dao-pre-propose-multiple/src/tests.rs index 7b845aab0..e256a1f47 100644 --- a/contracts/pre-propose/dao-pre-propose-multiple/src/tests.rs +++ b/contracts/pre-propose/dao-pre-propose-multiple/src/tests.rs @@ -5,8 +5,8 @@ use cw20::Cw20Coin; use cw_denom::UncheckedDenom; use cw_multi_test::{App, BankSudo, Contract, ContractWrapper, Executor}; use cw_utils::Duration; -use dao_core::state::ProposalModule; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::state::ProposalModule; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use dao_pre_propose_base::{error::PreProposeError, msg::DepositInfoResponse, state::Config}; use dao_proposal_multiple as cpm; use dao_testing::helpers::instantiate_with_cw4_groups_governance; @@ -137,7 +137,7 @@ fn setup_default_test( .wrap() .query_wasm_smart( core_addr.clone(), - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, diff --git a/contracts/pre-propose/dao-pre-propose-single/Cargo.toml b/contracts/pre-propose/dao-pre-propose-single/Cargo.toml index f98abdae0..c7d1dd39a 100644 --- a/contracts/pre-propose/dao-pre-propose-single/Cargo.toml +++ b/contracts/pre-propose/dao-pre-propose-single/Cargo.toml @@ -30,7 +30,7 @@ cw4-group = { workspace = true } cw20 = { workspace = true } cw20-base = { workspace = true } dao-voting-cw20-staked = { workspace = true } -dao-core = { workspace = true } +dao-dao-core = { workspace = true } dao-voting-cw4 = { workspace = true } dao-voting = { workspace = true } cw-denom = { workspace = true } diff --git a/contracts/pre-propose/dao-pre-propose-single/schema/dao-pre-propose-single.json b/contracts/pre-propose/dao-pre-propose-single/schema/dao-pre-propose-single.json index a2915764f..9cf71147a 100644 --- a/contracts/pre-propose/dao-pre-propose-single/schema/dao-pre-propose-single.json +++ b/contracts/pre-propose/dao-pre-propose-single/schema/dao-pre-propose-single.json @@ -1,6 +1,6 @@ { "contract_name": "dao-pre-propose-single", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", @@ -88,7 +88,7 @@ "additionalProperties": false }, { - "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", + "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", "type": "object", "required": [ "voting_module_token" @@ -601,7 +601,7 @@ "additionalProperties": false }, { - "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", + "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `dao_dao_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", "type": "object", "required": [ "voting_module_token" @@ -1314,7 +1314,7 @@ "additionalProperties": false }, { - "description": "Gets the DAO (cw-dao-core) module this contract is associated with. Returns `Addr`.", + "description": "Gets the DAO (dao-dao-core) module this contract is associated with. Returns `Addr`.", "type": "object", "required": [ "dao" diff --git a/contracts/pre-propose/dao-pre-propose-single/src/tests.rs b/contracts/pre-propose/dao-pre-propose-single/src/tests.rs index a93c78b5c..6a8b48e9f 100644 --- a/contracts/pre-propose/dao-pre-propose-single/src/tests.rs +++ b/contracts/pre-propose/dao-pre-propose-single/src/tests.rs @@ -5,8 +5,8 @@ use cw20::Cw20Coin; use cw_denom::UncheckedDenom; use cw_multi_test::{App, BankSudo, Contract, ContractWrapper, Executor}; use cw_utils::Duration; -use dao_core::state::ProposalModule; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::state::ProposalModule; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use dao_pre_propose_base::{error::PreProposeError, msg::DepositInfoResponse, state::Config}; use dao_proposal_single as cps; use dao_testing::helpers::instantiate_with_cw4_groups_governance; @@ -135,7 +135,7 @@ fn setup_default_test( .wrap() .query_wasm_smart( core_addr.clone(), - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, diff --git a/contracts/proposal/dao-proposal-condorcet/Cargo.toml b/contracts/proposal/dao-proposal-condorcet/Cargo.toml index c9675b568..a53910b27 100644 --- a/contracts/proposal/dao-proposal-condorcet/Cargo.toml +++ b/contracts/proposal/dao-proposal-condorcet/Cargo.toml @@ -5,7 +5,7 @@ description = "A DAO DAO proposal module with ranked-choice, Condorcet voting." edition = { workspace = true } license = { workspace = true } repository = { workspace = true } -version = "0.1.0" +version = { workspace = true } [lib] crate-type = ["cdylib", "rlib"] @@ -22,20 +22,16 @@ cosmwasm-schema = { workspace = true } cw-storage-plus = { workspace = true } cw2 = { workspace = true } cw-utils = { workspace = true } - dao-voting = { workspace = true } -dao-macros = { workspace = true } +dao-dao-macros = { workspace = true } dao-interface = { workspace = true } - -dao-core = { workspace = true, features = ["library"] } - thiserror = { workspace = true } [dev-dependencies] cosmwasm-schema = { workspace = true } cw-multi-test = { workspace = true } +dao-dao-core = { workspace = true, features = ["library"] } dao-testing = { workspace = true } - dao-voting-cw4 = { workspace = true } cw4-group = { workspace = true } cw4 = { workspace = true } diff --git a/contracts/proposal/dao-proposal-condorcet/schema/dao-proposal-condorcet.json b/contracts/proposal/dao-proposal-condorcet/schema/dao-proposal-condorcet.json index dbfb1718a..75f0440a9 100644 --- a/contracts/proposal/dao-proposal-condorcet/schema/dao-proposal-condorcet.json +++ b/contracts/proposal/dao-proposal-condorcet/schema/dao-proposal-condorcet.json @@ -1,6 +1,6 @@ { "contract_name": "dao-proposal-condorcet", - "contract_version": "0.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/proposal/dao-proposal-condorcet/src/msg.rs b/contracts/proposal/dao-proposal-condorcet/src/msg.rs index e27a582d1..ab6f5aa12 100644 --- a/contracts/proposal/dao-proposal-condorcet/src/msg.rs +++ b/contracts/proposal/dao-proposal-condorcet/src/msg.rs @@ -1,7 +1,7 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::{CosmosMsg, Empty}; -use dao_macros::proposal_module_query; +use dao_dao_macros::proposal_module_query; use crate::config::UncheckedConfig; diff --git a/contracts/proposal/dao-proposal-condorcet/src/proposal.rs b/contracts/proposal/dao-proposal-condorcet/src/proposal.rs index fff433362..155b90cc2 100644 --- a/contracts/proposal/dao-proposal-condorcet/src/proposal.rs +++ b/contracts/proposal/dao-proposal-condorcet/src/proposal.rs @@ -161,7 +161,7 @@ impl Proposal { let msgs = self.choices[winner as usize].msgs.clone(); let core_exec = WasmMsg::Execute { contract_addr: dao.into_string(), - msg: to_binary(&dao_core::msg::ExecuteMsg::ExecuteProposalHook { msgs })?, + msg: to_binary(&dao_interface::msg::ExecuteMsg::ExecuteProposalHook { msgs })?, funds: vec![], }; Ok(if self.close_on_execution_failure { diff --git a/contracts/proposal/dao-proposal-condorcet/src/testing/suite.rs b/contracts/proposal/dao-proposal-condorcet/src/testing/suite.rs index e395581a1..d3c4779b3 100644 --- a/contracts/proposal/dao-proposal-condorcet/src/testing/suite.rs +++ b/contracts/proposal/dao-proposal-condorcet/src/testing/suite.rs @@ -1,9 +1,12 @@ use cosmwasm_std::{coins, to_binary, Addr, BankMsg, CosmosMsg, Decimal}; use cw_multi_test::{next_block, App, Executor}; use cw_utils::Duration; -use dao_interface::{voting::InfoResponse, Admin, ModuleInstantiateInfo}; +use dao_interface::{ + state::{Admin, ModuleInstantiateInfo}, + voting::InfoResponse, +}; use dao_testing::contracts::{ - cw4_group_contract, dao_core_contract, dao_voting_cw4_contract, proposal_condorcet_contract, + cw4_group_contract, dao_dao_contract, dao_voting_cw4_contract, proposal_condorcet_contract, }; use dao_voting::threshold::PercentageThreshold; @@ -71,11 +74,11 @@ impl SuiteBuilder { let mut app = App::default(); let condorcet_id = app.store_code(proposal_condorcet_contract()); - let core_id = app.store_code(dao_core_contract()); + let core_id = app.store_code(dao_dao_contract()); let cw4_id = app.store_code(cw4_group_contract()); let cw4_voting_id = app.store_code(dao_voting_cw4_contract()); - let core_instantiate = dao_core::msg::InstantiateMsg { + let core_instantiate = dao_interface::msg::InstantiateMsg { admin: None, name: "core module".to_string(), description: "core module".to_string(), @@ -111,11 +114,11 @@ impl SuiteBuilder { None, ) .unwrap(); - let condorcet: Vec = app + let condorcet: Vec = app .wrap() .query_wasm_smart( &core, - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, diff --git a/contracts/proposal/dao-proposal-multiple/Cargo.toml b/contracts/proposal/dao-proposal-multiple/Cargo.toml index 927a14b3a..94fe6cda0 100644 --- a/contracts/proposal/dao-proposal-multiple/Cargo.toml +++ b/contracts/proposal/dao-proposal-multiple/Cargo.toml @@ -33,8 +33,7 @@ cw2 = { workspace = true } cw20 = { workspace = true } cw3 = { workspace = true } thiserror = { version = "1.0" } -dao-core = { workspace = true, features = ["library"] } -dao-macros = { workspace = true } +dao-dao-macros = { workspace = true } dao-pre-propose-base = { workspace = true } dao-interface = { workspace = true } dao-voting = { workspace = true } diff --git a/contracts/proposal/dao-proposal-multiple/schema/dao-proposal-multiple.json b/contracts/proposal/dao-proposal-multiple/schema/dao-proposal-multiple.json index d3b26b591..085214aa4 100644 --- a/contracts/proposal/dao-proposal-multiple/schema/dao-proposal-multiple.json +++ b/contracts/proposal/dao-proposal-multiple/schema/dao-proposal-multiple.json @@ -1,6 +1,6 @@ { "contract_name": "dao-proposal-multiple", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/proposal/dao-proposal-multiple/src/contract.rs b/contracts/proposal/dao-proposal-multiple/src/contract.rs index 619f5771a..35465ab50 100644 --- a/contracts/proposal/dao-proposal-multiple/src/contract.rs +++ b/contracts/proposal/dao-proposal-multiple/src/contract.rs @@ -182,7 +182,7 @@ pub fn execute_propose( let voting_module: Addr = deps.querier.query_wasm_smart( config.dao.clone(), - &dao_core::msg::QueryMsg::VotingModule {}, + &dao_interface::msg::QueryMsg::VotingModule {}, )?; // Voting modules are not required to implement this @@ -400,7 +400,7 @@ pub fn execute_execute( let response = if !winning_choice.msgs.is_empty() { let execute_message = WasmMsg::Execute { contract_addr: config.dao.to_string(), - msg: to_binary(&dao_core::msg::ExecuteMsg::ExecuteProposalHook { + msg: to_binary(&dao_interface::msg::ExecuteMsg::ExecuteProposalHook { msgs: winning_choice.msgs, })?, funds: vec![], diff --git a/contracts/proposal/dao-proposal-multiple/src/msg.rs b/contracts/proposal/dao-proposal-multiple/src/msg.rs index 1f4173cd2..a79fca805 100644 --- a/contracts/proposal/dao-proposal-multiple/src/msg.rs +++ b/contracts/proposal/dao-proposal-multiple/src/msg.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; use cw_utils::Duration; -use dao_macros::proposal_module_query; +use dao_dao_macros::proposal_module_query; use dao_voting::{ multiple_choice::{MultipleChoiceOptions, MultipleChoiceVote, VotingStrategy}, pre_propose::PreProposeInfo, diff --git a/contracts/proposal/dao-proposal-multiple/src/testing/do_votes.rs b/contracts/proposal/dao-proposal-multiple/src/testing/do_votes.rs index 6d3ad5d35..32eb43168 100644 --- a/contracts/proposal/dao-proposal-multiple/src/testing/do_votes.rs +++ b/contracts/proposal/dao-proposal-multiple/src/testing/do_votes.rs @@ -2,7 +2,7 @@ use cosmwasm_std::{coins, Addr, Decimal, Uint128}; use cw20::Cw20Coin; use cw_denom::CheckedDenom; use cw_multi_test::{App, BankSudo, Executor}; -use dao_core::state::ProposalModule; +use dao_interface::state::ProposalModule; use dao_testing::ShouldExecute; use dao_voting::{ deposit::{CheckedDepositInfo, UncheckedDepositInfo}, @@ -138,7 +138,7 @@ where .wrap() .query_wasm_smart( governance_addr.clone(), - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, diff --git a/contracts/proposal/dao-proposal-multiple/src/testing/instantiate.rs b/contracts/proposal/dao-proposal-multiple/src/testing/instantiate.rs index 363f310d5..f27d06c7b 100644 --- a/contracts/proposal/dao-proposal-multiple/src/testing/instantiate.rs +++ b/contracts/proposal/dao-proposal-multiple/src/testing/instantiate.rs @@ -3,13 +3,13 @@ use cw20::Cw20Coin; use cw_multi_test::{next_block, App, BankSudo, ContractWrapper, Executor, SudoMsg}; use cw_utils::Duration; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use dao_pre_propose_multiple as cppm; use dao_testing::contracts::{ cw20_balances_voting_contract, cw20_base_contract, cw20_stake_contract, cw20_staked_balances_voting_contract, cw4_group_contract, cw721_base_contract, - dao_core_contract, native_staked_balances_voting_contract, pre_propose_multiple_contract, + dao_dao_contract, native_staked_balances_voting_contract, pre_propose_multiple_contract, }; use dao_voting::{ deposit::{DepositRefundPolicy, UncheckedDepositInfo}, @@ -124,7 +124,7 @@ pub fn _instantiate_with_staked_cw721_governance( ); Box::new(contract) }); - let core_contract_id = app.store_code(dao_core_contract()); + let core_contract_id = app.store_code(dao_dao_contract()); let nft_address = app .instantiate_contract( @@ -141,7 +141,7 @@ pub fn _instantiate_with_staked_cw721_governance( ) .unwrap(); - let instantiate_core = dao_core::msg::InstantiateMsg { + let instantiate_core = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), @@ -180,9 +180,12 @@ pub fn _instantiate_with_staked_cw721_governance( ) .unwrap(); - let core_state: dao_core::query::DumpStateResponse = app + let core_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr.clone(), &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart( + core_addr.clone(), + &dao_interface::msg::QueryMsg::DumpState {}, + ) .unwrap(); let staking_addr = core_state.voting_module; @@ -253,9 +256,9 @@ pub fn _instantiate_with_native_staked_balances_governance( }; let native_stake_id = app.store_code(native_staked_balances_voting_contract()); - let core_contract_id = app.store_code(dao_core_contract()); + let core_contract_id = app.store_code(dao_dao_contract()); - let instantiate_core = dao_core::msg::InstantiateMsg { + let instantiate_core = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), @@ -295,9 +298,12 @@ pub fn _instantiate_with_native_staked_balances_governance( ) .unwrap(); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr.clone(), &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart( + core_addr.clone(), + &dao_interface::msg::QueryMsg::DumpState {}, + ) .unwrap(); let native_staking_addr = gov_state.voting_module; @@ -335,7 +341,7 @@ pub fn instantiate_with_cw20_balances_governance( let proposal_module_code_id = app.store_code(proposal_multiple_contract()); let cw20_id = app.store_code(cw20_base_contract()); - let core_id = app.store_code(dao_core_contract()); + let core_id = app.store_code(dao_dao_contract()); let votemod_id = app.store_code(cw20_balances_voting_contract()); let initial_balances = initial_balances.unwrap_or_else(|| { @@ -361,7 +367,7 @@ pub fn instantiate_with_cw20_balances_governance( .collect() }; - let governance_instantiate = dao_core::msg::InstantiateMsg { + let governance_instantiate = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), @@ -439,9 +445,9 @@ pub fn instantiate_with_staked_balances_governance( let cw20_id = app.store_code(cw20_base_contract()); let cw20_stake_id = app.store_code(cw20_stake_contract()); let staked_balances_voting_id = app.store_code(cw20_staked_balances_voting_contract()); - let core_contract_id = app.store_code(dao_core_contract()); + let core_contract_id = app.store_code(dao_dao_contract()); - let instantiate_core = dao_core::msg::InstantiateMsg { + let instantiate_core = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), @@ -490,9 +496,12 @@ pub fn instantiate_with_staked_balances_governance( ) .unwrap(); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr.clone(), &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart( + core_addr.clone(), + &dao_interface::msg::QueryMsg::DumpState {}, + ) .unwrap(); let voting_module = gov_state.voting_module; @@ -571,9 +580,9 @@ pub fn instantiate_with_multiple_staked_balances_governance( let cw20_id = app.store_code(cw20_base_contract()); let cw20_stake_id = app.store_code(cw20_stake_contract()); let staked_balances_voting_id = app.store_code(cw20_staked_balances_voting_contract()); - let core_contract_id = app.store_code(dao_core_contract()); + let core_contract_id = app.store_code(dao_dao_contract()); - let instantiate_core = dao_core::msg::InstantiateMsg { + let instantiate_core = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), @@ -624,9 +633,12 @@ pub fn instantiate_with_multiple_staked_balances_governance( ) .unwrap(); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr.clone(), &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart( + core_addr.clone(), + &dao_interface::msg::QueryMsg::DumpState {}, + ) .unwrap(); let voting_module = gov_state.voting_module; @@ -675,7 +687,7 @@ pub fn instantiate_with_staking_active_threshold( let proposal_module_code_id = app.store_code(proposal_multiple_contract()); let cw20_id = app.store_code(cw20_base_contract()); let cw20_staking_id = app.store_code(cw20_stake_contract()); - let core_id = app.store_code(dao_core_contract()); + let core_id = app.store_code(dao_dao_contract()); let votemod_id = app.store_code(cw20_staked_balances_voting_contract()); let initial_balances = initial_balances.unwrap_or_else(|| { @@ -685,7 +697,7 @@ pub fn instantiate_with_staking_active_threshold( }] }); - let governance_instantiate = dao_core::msg::InstantiateMsg { + let governance_instantiate = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), @@ -741,7 +753,7 @@ pub fn _instantiate_with_cw4_groups_governance( ) -> Addr { let proposal_module_code_id = app.store_code(proposal_multiple_contract()); let cw4_id = app.store_code(cw4_group_contract()); - let core_id = app.store_code(dao_core_contract()); + let core_id = app.store_code(dao_dao_contract()); let votemod_id = app.store_code(cw4_group_contract()); let initial_weights = initial_weights.unwrap_or_else(|| { @@ -771,7 +783,7 @@ pub fn _instantiate_with_cw4_groups_governance( .collect() }; - let governance_instantiate = dao_core::msg::InstantiateMsg { + let governance_instantiate = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), diff --git a/contracts/proposal/dao-proposal-multiple/src/testing/queries.rs b/contracts/proposal/dao-proposal-multiple/src/testing/queries.rs index ac50289e2..da528383d 100644 --- a/contracts/proposal/dao-proposal-multiple/src/testing/queries.rs +++ b/contracts/proposal/dao-proposal-multiple/src/testing/queries.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{Addr, Uint128}; use cw_hooks::HooksResponse; use cw_multi_test::App; -use dao_core::state::{ProposalModule, ProposalModuleStatus}; +use dao_interface::state::{ProposalModule, ProposalModuleStatus}; use dao_pre_propose_multiple as cppm; use dao_voting::pre_propose::ProposalCreationPolicy; @@ -49,7 +49,7 @@ pub fn query_multiple_proposal_module(app: &App, core_addr: &Addr) -> Addr { .wrap() .query_wasm_smart( core_addr, - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, @@ -127,14 +127,14 @@ pub fn query_dao_token(app: &App, core_addr: &Addr) -> Addr { pub fn query_voting_module(app: &App, core_addr: &Addr) -> Addr { app.wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::VotingModule {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::VotingModule {}) .unwrap() } pub fn query_cw20_token_staking_contracts(app: &App, core_addr: &Addr) -> (Addr, Addr) { let voting_module: Addr = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::VotingModule {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::VotingModule {}) .unwrap(); let token_contract: Addr = app .wrap() diff --git a/contracts/proposal/dao-proposal-multiple/src/testing/tests.rs b/contracts/proposal/dao-proposal-multiple/src/testing/tests.rs index 69be27727..2d3fd6e37 100644 --- a/contracts/proposal/dao-proposal-multiple/src/testing/tests.rs +++ b/contracts/proposal/dao-proposal-multiple/src/testing/tests.rs @@ -4,8 +4,8 @@ use cw_denom::{CheckedDenom, UncheckedDenom}; use cw_hooks::HooksResponse; use cw_multi_test::{next_block, App, BankSudo, Contract, ContractWrapper, Executor, SudoMsg}; use cw_utils::Duration; -use dao_core::state::ProposalModule; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::state::ProposalModule; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use dao_voting::{ deposit::{CheckedDepositInfo, DepositRefundPolicy, DepositToken, UncheckedDepositInfo}, multiple_choice::{ @@ -278,9 +278,9 @@ fn test_proposal_count_initialized_to_zero() { }; let core_addr = instantiate_with_staked_balances_governance(&mut app, msg, None); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let proposal_modules = gov_state.proposal_modules; @@ -326,9 +326,9 @@ fn test_no_early_pass_with_min_duration() { ]), ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let proposal_modules = gov_state.proposal_modules; @@ -420,9 +420,9 @@ fn test_propose_with_messages() { ]), ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let proposal_modules = gov_state.proposal_modules; @@ -602,9 +602,9 @@ fn test_min_duration_same_as_proposal_duration() { ]), ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let proposal_modules = gov_state.proposal_modules; @@ -709,9 +709,12 @@ fn test_voting_module_token_proposal_deposit_instantiate() { let core_addr = instantiate_with_staked_balances_governance(&mut app, instantiate, None); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr.clone(), &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart( + core_addr.clone(), + &dao_interface::msg::QueryMsg::DumpState {}, + ) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -879,9 +882,9 @@ fn test_take_proposal_deposit() { }]), ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -984,9 +987,9 @@ fn test_native_proposal_deposit() { }]), ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -1114,9 +1117,9 @@ fn test_deposit_return_on_execute() { true, ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -1171,9 +1174,12 @@ fn test_deposit_return_zero() { true, ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr.clone(), &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart( + core_addr.clone(), + &dao_interface::msg::QueryMsg::DumpState {}, + ) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -1223,9 +1229,9 @@ fn test_query_list_votes() { true, ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -1301,9 +1307,9 @@ fn test_cant_vote_executed_or_closed() { true, ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -1412,9 +1418,9 @@ fn test_cant_propose_zero_power() { ]), ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let proposal_modules = gov_state.proposal_modules; @@ -1511,9 +1517,9 @@ fn test_cant_vote_not_registered() { false, ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -1862,9 +1868,9 @@ fn test_close_open_proposal() { false, ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -1930,9 +1936,9 @@ fn test_no_refund_failed_proposal() { false, ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -2007,9 +2013,9 @@ fn test_deposit_return_on_close() { }), false, ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -2076,9 +2082,9 @@ fn test_execute_expired_proposal() { ]), ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let proposal_modules = gov_state.proposal_modules; @@ -2186,9 +2192,9 @@ fn test_update_config() { false, ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -2302,9 +2308,9 @@ fn test_no_return_if_no_refunds() { }), true, ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -2364,7 +2370,7 @@ fn test_query_list_proposals() { .wrap() .query_wasm_smart( gov_addr, - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, @@ -2625,7 +2631,7 @@ fn test_active_threshold_absolute() { let dao = govmod_config.dao; let voting_module: Addr = app .wrap() - .query_wasm_smart(dao, &dao_core::msg::QueryMsg::VotingModule {}) + .query_wasm_smart(dao, &dao_interface::msg::QueryMsg::VotingModule {}) .unwrap(); let staking_contract: Addr = app .wrap() @@ -2753,7 +2759,7 @@ fn test_active_threshold_percent() { let dao = govmod_config.dao; let voting_module: Addr = app .wrap() - .query_wasm_smart(dao, &dao_core::msg::QueryMsg::VotingModule {}) + .query_wasm_smart(dao, &dao_interface::msg::QueryMsg::VotingModule {}) .unwrap(); let staking_contract: Addr = app .wrap() @@ -2874,7 +2880,7 @@ fn test_active_threshold_none() { let dao = govmod_config.dao; let voting_module: Addr = app .wrap() - .query_wasm_smart(dao, &dao_core::msg::QueryMsg::VotingModule {}) + .query_wasm_smart(dao, &dao_interface::msg::QueryMsg::VotingModule {}) .unwrap(); let staking_contract: Addr = app .wrap() @@ -3487,9 +3493,12 @@ fn test_return_deposit_to_dao_on_proposal_failure() { false, ); - let core_state: dao_core::query::DumpStateResponse = app + let core_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr.clone(), &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart( + core_addr.clone(), + &dao_interface::msg::QueryMsg::DumpState {}, + ) .unwrap(); let proposal_modules = core_state.proposal_modules; @@ -3548,7 +3557,7 @@ fn test_close_failed_proposal() { let dao = govmod_config.dao; let voting_module: Addr = app .wrap() - .query_wasm_smart(dao, &dao_core::msg::QueryMsg::VotingModule {}) + .query_wasm_smart(dao, &dao_interface::msg::QueryMsg::VotingModule {}) .unwrap(); let staking_contract: Addr = app .wrap() @@ -3806,7 +3815,7 @@ fn test_no_double_refund_on_execute_fail_and_close() { let dao = proposal_config.dao; let voting_module: Addr = app .wrap() - .query_wasm_smart(dao, &dao_core::msg::QueryMsg::VotingModule {}) + .query_wasm_smart(dao, &dao_interface::msg::QueryMsg::VotingModule {}) .unwrap(); let staking_contract: Addr = app .wrap() @@ -4140,9 +4149,9 @@ fn test_vote_with_rationale() { ]), ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -4236,9 +4245,9 @@ fn test_revote_with_rationale() { ]), ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; @@ -4390,9 +4399,9 @@ fn test_update_rationale() { ]), ); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let governance_modules = gov_state.proposal_modules; diff --git a/contracts/proposal/dao-proposal-single/Cargo.toml b/contracts/proposal/dao-proposal-single/Cargo.toml index 79799674c..fdf6e842d 100644 --- a/contracts/proposal/dao-proposal-single/Cargo.toml +++ b/contracts/proposal/dao-proposal-single/Cargo.toml @@ -27,8 +27,7 @@ cw20 = { workspace = true } cw3 = { workspace = true } thiserror = { workspace = true } -dao-core = { workspace = true, features = ["library"] } -dao-macros = { workspace = true } +dao-dao-macros = { workspace = true } dao-pre-propose-base = { workspace = true } dao-interface = { workspace = true } dao-voting = { workspace = true } @@ -43,6 +42,7 @@ cw-proposal-single-v1 = { workspace = true, features = ["library"] } [dev-dependencies] cosmwasm-schema = { workspace = true } cw-multi-test = { workspace = true } +dao-dao-core = { workspace = true } dao-voting-cw4 = { workspace = true } dao-voting-cw20-balance = { workspace = true } dao-voting-cw20-staked = { workspace = true } diff --git a/contracts/proposal/dao-proposal-single/schema/dao-proposal-single.json b/contracts/proposal/dao-proposal-single/schema/dao-proposal-single.json index c016b8ef0..37495bf6c 100644 --- a/contracts/proposal/dao-proposal-single/schema/dao-proposal-single.json +++ b/contracts/proposal/dao-proposal-single/schema/dao-proposal-single.json @@ -1,6 +1,6 @@ { "contract_name": "dao-proposal-single", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/proposal/dao-proposal-single/src/contract.rs b/contracts/proposal/dao-proposal-single/src/contract.rs index 29aaa9a52..5f30030f5 100644 --- a/contracts/proposal/dao-proposal-single/src/contract.rs +++ b/contracts/proposal/dao-proposal-single/src/contract.rs @@ -180,7 +180,7 @@ pub fn execute_propose( let voting_module: Addr = deps.querier.query_wasm_smart( config.dao.clone(), - &dao_core::msg::QueryMsg::VotingModule {}, + &dao_interface::msg::QueryMsg::VotingModule {}, )?; // Voting modules are not required to implement this @@ -295,7 +295,7 @@ pub fn execute_execute( if !prop.msgs.is_empty() { let execute_message = WasmMsg::Execute { contract_addr: config.dao.to_string(), - msg: to_binary(&dao_core::msg::ExecuteMsg::ExecuteProposalHook { + msg: to_binary(&dao_interface::msg::ExecuteMsg::ExecuteProposalHook { msgs: prop.msgs, })?, funds: vec![], diff --git a/contracts/proposal/dao-proposal-single/src/msg.rs b/contracts/proposal/dao-proposal-single/src/msg.rs index 1d177798a..c0be9b317 100644 --- a/contracts/proposal/dao-proposal-single/src/msg.rs +++ b/contracts/proposal/dao-proposal-single/src/msg.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; use cw_utils::Duration; -use dao_macros::proposal_module_query; +use dao_dao_macros::proposal_module_query; use dao_voting::{ pre_propose::PreProposeInfo, proposal::SingleChoiceProposeMsg, threshold::Threshold, voting::Vote, diff --git a/contracts/proposal/dao-proposal-single/src/testing/contracts.rs b/contracts/proposal/dao-proposal-single/src/testing/contracts.rs index b5abb5d70..f27bd7e35 100644 --- a/contracts/proposal/dao-proposal-single/src/testing/contracts.rs +++ b/contracts/proposal/dao-proposal-single/src/testing/contracts.rs @@ -100,11 +100,11 @@ pub(crate) fn cw721_stake_contract() -> Box> { pub(crate) fn cw_core_contract() -> Box> { let contract = ContractWrapper::new( - dao_core::contract::execute, - dao_core::contract::instantiate, - dao_core::contract::query, + dao_dao_core::contract::execute, + dao_dao_core::contract::instantiate, + dao_dao_core::contract::query, ) - .with_reply(dao_core::contract::reply); + .with_reply(dao_dao_core::contract::reply); Box::new(contract) } diff --git a/contracts/proposal/dao-proposal-single/src/testing/do_votes.rs b/contracts/proposal/dao-proposal-single/src/testing/do_votes.rs index ab54464ad..ecd72e325 100644 --- a/contracts/proposal/dao-proposal-single/src/testing/do_votes.rs +++ b/contracts/proposal/dao-proposal-single/src/testing/do_votes.rs @@ -2,7 +2,7 @@ use cosmwasm_std::{coins, Addr, Uint128}; use cw20::Cw20Coin; use cw_multi_test::{App, BankSudo, Executor}; -use dao_core::state::ProposalModule; +use dao_interface::state::ProposalModule; use dao_pre_propose_single as cppbps; use cw_denom::CheckedDenom; @@ -136,7 +136,7 @@ where .wrap() .query_wasm_smart( core_addr.clone(), - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, diff --git a/contracts/proposal/dao-proposal-single/src/testing/instantiate.rs b/contracts/proposal/dao-proposal-single/src/testing/instantiate.rs index 58b242777..cd9f03549 100644 --- a/contracts/proposal/dao-proposal-single/src/testing/instantiate.rs +++ b/contracts/proposal/dao-proposal-single/src/testing/instantiate.rs @@ -4,7 +4,7 @@ use dao_voting_cw20_staked::msg::ActiveThreshold; use cw_multi_test::{next_block, App, BankSudo, Executor, SudoMsg}; use cw_utils::Duration; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use dao_pre_propose_single as cppbps; use dao_voting::{ @@ -135,7 +135,7 @@ pub(crate) fn instantiate_with_staked_cw721_governance( ) .unwrap(); - let instantiate_core = dao_core::msg::InstantiateMsg { + let instantiate_core = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), @@ -174,9 +174,12 @@ pub(crate) fn instantiate_with_staked_cw721_governance( ) .unwrap(); - let core_state: dao_core::query::DumpStateResponse = app + let core_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr.clone(), &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart( + core_addr.clone(), + &dao_interface::msg::QueryMsg::DumpState {}, + ) .unwrap(); let staking_addr = core_state.voting_module; @@ -249,7 +252,7 @@ pub(crate) fn instantiate_with_native_staked_balances_governance( let native_stake_id = app.store_code(native_staked_balances_voting_contract()); let core_contract_id = app.store_code(cw_core_contract()); - let instantiate_core = dao_core::msg::InstantiateMsg { + let instantiate_core = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), @@ -289,9 +292,12 @@ pub(crate) fn instantiate_with_native_staked_balances_governance( ) .unwrap(); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr.clone(), &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart( + core_addr.clone(), + &dao_interface::msg::QueryMsg::DumpState {}, + ) .unwrap(); let native_staking_addr = gov_state.voting_module; @@ -356,7 +362,7 @@ pub(crate) fn instantiate_with_staked_balances_governance( let staked_balances_voting_id = app.store_code(cw20_staked_balances_voting_contract()); let core_contract_id = app.store_code(cw_core_contract()); - let instantiate_core = dao_core::msg::InstantiateMsg { + let instantiate_core = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), @@ -405,9 +411,12 @@ pub(crate) fn instantiate_with_staked_balances_governance( ) .unwrap(); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr.clone(), &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart( + core_addr.clone(), + &dao_interface::msg::QueryMsg::DumpState {}, + ) .unwrap(); let voting_module = gov_state.voting_module; @@ -466,7 +475,7 @@ pub(crate) fn instantiate_with_staking_active_threshold( }] }); - let governance_instantiate = dao_core::msg::InstantiateMsg { + let governance_instantiate = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), @@ -552,7 +561,7 @@ pub(crate) fn instantiate_with_cw4_groups_governance( .collect() }; - let governance_instantiate = dao_core::msg::InstantiateMsg { + let governance_instantiate = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), diff --git a/contracts/proposal/dao-proposal-single/src/testing/migration_tests.rs b/contracts/proposal/dao-proposal-single/src/testing/migration_tests.rs index 7566a6666..1e3aa7c0c 100644 --- a/contracts/proposal/dao-proposal-single/src/testing/migration_tests.rs +++ b/contracts/proposal/dao-proposal-single/src/testing/migration_tests.rs @@ -1,10 +1,10 @@ use cosmwasm_std::{to_binary, Addr, Uint128, WasmMsg}; use cw20::Cw20Coin; use cw_multi_test::{next_block, App, Executor}; -use dao_core::query::{GetItemResponse, ProposalModuleCountResponse}; +use dao_interface::query::{GetItemResponse, ProposalModuleCountResponse}; use dao_testing::contracts::{ cw20_base_contract, cw20_stake_contract, cw20_staked_balances_voting_contract, - dao_core_contract, proposal_single_contract, v1_dao_core_contract, v1_proposal_single_contract, + dao_dao_contract, proposal_single_contract, v1_dao_dao_contract, v1_proposal_single_contract, }; use dao_voting::{deposit::UncheckedDepositInfo, status::Status}; @@ -42,7 +42,7 @@ fn test_v1_v2_full_migration() { // ---- let proposal_code = app.store_code(v1_proposal_single_contract()); - let core_code = app.store_code(v1_dao_core_contract()); + let core_code = app.store_code(v1_dao_dao_contract()); // cw20 staking and voting module has not changed across v1->v2 so // we use the current edition. @@ -294,7 +294,7 @@ fn test_v1_v2_full_migration() { // create a proposal to migrate to v2 // ---- - let v2_core_code = app.store_code(dao_core_contract()); + let v2_core_code = app.store_code(dao_dao_contract()); let v2_proposal_code = app.store_code(proposal_single_contract()); let pre_propose_info = get_pre_propose_info( @@ -316,7 +316,7 @@ fn test_v1_v2_full_migration() { WasmMsg::Migrate { contract_addr: core.to_string(), new_code_id: v2_core_code, - msg: to_binary(&dao_core::msg::MigrateMsg::FromV1 { + msg: to_binary(&dao_interface::msg::MigrateMsg::FromV1 { dao_uri: Some("dao-uri".to_string()), params: None, }) @@ -375,7 +375,7 @@ fn test_v1_v2_full_migration() { // ---- let module_counts: ProposalModuleCountResponse = app .wrap() - .query_wasm_smart(&core, &dao_core::msg::QueryMsg::ProposalModuleCount {}) + .query_wasm_smart(&core, &dao_interface::msg::QueryMsg::ProposalModuleCount {}) .unwrap(); assert_eq!( module_counts, @@ -392,7 +392,7 @@ fn test_v1_v2_full_migration() { .wrap() .query_wasm_smart( &core, - &dao_core::msg::QueryMsg::GetItem { + &dao_interface::msg::QueryMsg::GetItem { key: "key".to_string(), }, ) @@ -413,7 +413,7 @@ fn test_v1_v2_full_migration() { sender.as_str(), vec![WasmMsg::Execute { contract_addr: core.to_string(), - msg: to_binary(&dao_core::msg::ExecuteMsg::UpdateCw20List { + msg: to_binary(&dao_interface::msg::ExecuteMsg::UpdateCw20List { to_add: vec![], to_remove: vec![token.into_string()], }) @@ -430,11 +430,11 @@ fn test_v1_v2_full_migration() { dao_voting::voting::Vote::Yes, ); execute_proposal(&mut app, &proposal, sender.as_str(), 4); - let tokens: Vec = app + let tokens: Vec = app .wrap() .query_wasm_smart( &core, - &dao_core::msg::QueryMsg::Cw20Balances { + &dao_interface::msg::QueryMsg::Cw20Balances { start_after: None, limit: None, }, diff --git a/contracts/proposal/dao-proposal-single/src/testing/queries.rs b/contracts/proposal/dao-proposal-single/src/testing/queries.rs index fda208617..a246f1c64 100644 --- a/contracts/proposal/dao-proposal-single/src/testing/queries.rs +++ b/contracts/proposal/dao-proposal-single/src/testing/queries.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{Addr, Uint128}; use cw_multi_test::App; -use dao_core::state::{ProposalModule, ProposalModuleStatus}; +use dao_interface::state::{ProposalModule, ProposalModuleStatus}; use cw_hooks::HooksResponse; use dao_pre_propose_single as cppbps; @@ -139,7 +139,7 @@ pub(crate) fn query_single_proposal_module(app: &App, core_addr: &Addr) -> Addr .wrap() .query_wasm_smart( core_addr, - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, @@ -174,7 +174,7 @@ pub(crate) fn query_dao_token(app: &App, core_addr: &Addr) -> Addr { pub(crate) fn query_voting_module(app: &App, core_addr: &Addr) -> Addr { app.wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::VotingModule {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::VotingModule {}) .unwrap() } diff --git a/contracts/proposal/dao-proposal-single/src/testing/tests.rs b/contracts/proposal/dao-proposal-single/src/testing/tests.rs index 5bc4a8801..fff0baa98 100644 --- a/contracts/proposal/dao-proposal-single/src/testing/tests.rs +++ b/contracts/proposal/dao-proposal-single/src/testing/tests.rs @@ -10,7 +10,10 @@ use cw_denom::CheckedDenom; use cw_hooks::{HookError, HooksResponse}; use cw_multi_test::{next_block, App, Executor}; use cw_utils::Duration; -use dao_interface::{voting::InfoResponse, Admin, ModuleInstantiateInfo}; +use dao_interface::{ + state::{Admin, ModuleInstantiateInfo}, + voting::InfoResponse, +}; use dao_testing::{ShouldExecute, TestSingleChoiceVote}; use dao_voting::{ deposit::{CheckedDepositInfo, UncheckedDepositInfo}, @@ -1274,9 +1277,9 @@ fn test_three_of_five_multisig() { ]), ); - let core_state: dao_core::query::DumpStateResponse = app + let core_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let proposal_module = core_state .proposal_modules @@ -1356,9 +1359,9 @@ fn test_three_of_five_multisig_revoting() { ]), ); - let core_state: dao_core::query::DumpStateResponse = app + let core_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let proposal_module = core_state .proposal_modules @@ -1509,9 +1512,9 @@ fn test_proposal_count_initialized_to_zero() { ]), ); - let core_state: dao_core::query::DumpStateResponse = app + let core_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr, &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart(core_addr, &dao_interface::msg::QueryMsg::DumpState {}) .unwrap(); let proposal_modules = core_state.proposal_modules; @@ -1597,7 +1600,7 @@ fn test_migrate_from_v1() { let staked_balances_voting_id = app.store_code(cw20_staked_balances_voting_contract()); let core_contract_id = app.store_code(cw_core_contract()); - let instantiate_core = dao_core::msg::InstantiateMsg { + let instantiate_core = dao_interface::msg::InstantiateMsg { admin: None, name: "DAO DAO".to_string(), description: "A DAO that builds DAOs".to_string(), @@ -1646,9 +1649,12 @@ fn test_migrate_from_v1() { ) .unwrap(); - let core_state: dao_core::query::DumpStateResponse = app + let core_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr.clone(), &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart( + core_addr.clone(), + &dao_interface::msg::QueryMsg::DumpState {}, + ) .unwrap(); let voting_module = core_state.voting_module; diff --git a/contracts/staking/cw20-stake-external-rewards/Cargo.toml b/contracts/staking/cw20-stake-external-rewards/Cargo.toml index 58772630c..1a7dd7cf1 100644 --- a/contracts/staking/cw20-stake-external-rewards/Cargo.toml +++ b/contracts/staking/cw20-stake-external-rewards/Cargo.toml @@ -2,6 +2,7 @@ name = "cw20-stake-external-rewards" authors = ["Ben2x4 ", "ekez "] edition = "2018" +description = "Distributes staking rewards." license = { workspace = true } repository = { workspace = true } version = { workspace = true } diff --git a/contracts/staking/cw20-stake-external-rewards/schema/cw20-stake-external-rewards.json b/contracts/staking/cw20-stake-external-rewards/schema/cw20-stake-external-rewards.json index 847cf9bc8..af3bc2f44 100644 --- a/contracts/staking/cw20-stake-external-rewards/schema/cw20-stake-external-rewards.json +++ b/contracts/staking/cw20-stake-external-rewards/schema/cw20-stake-external-rewards.json @@ -1,6 +1,6 @@ { "contract_name": "cw20-stake-external-rewards", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/staking/cw20-stake-reward-distributor/Cargo.toml b/contracts/staking/cw20-stake-reward-distributor/Cargo.toml index ee115eea4..75972d965 100644 --- a/contracts/staking/cw20-stake-reward-distributor/Cargo.toml +++ b/contracts/staking/cw20-stake-reward-distributor/Cargo.toml @@ -2,10 +2,12 @@ name = "cw20-stake-reward-distributor" edition = "2018" authors = ["Vernon Johnson , ekez "] +description = "Distributes cw20 staking rewards." license = { workspace = true } repository = { workspace = true } version = { workspace = true } + [lib] crate-type = ["cdylib", "rlib"] diff --git a/contracts/staking/cw20-stake-reward-distributor/schema/cw20-stake-reward-distributor.json b/contracts/staking/cw20-stake-reward-distributor/schema/cw20-stake-reward-distributor.json index 64f5bf0dc..a816d65f7 100644 --- a/contracts/staking/cw20-stake-reward-distributor/schema/cw20-stake-reward-distributor.json +++ b/contracts/staking/cw20-stake-reward-distributor/schema/cw20-stake-reward-distributor.json @@ -1,6 +1,6 @@ { "contract_name": "cw20-stake-reward-distributor", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/staking/cw20-stake/Cargo.toml b/contracts/staking/cw20-stake/Cargo.toml index 6d7943032..a3706eed7 100644 --- a/contracts/staking/cw20-stake/Cargo.toml +++ b/contracts/staking/cw20-stake/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "cw20-stake" -version = { workspace = true } authors = ["Ben2x4 "] description = "CW20 token that can be staked and staked balance can be queried at any height" edition = "2018" license = { workspace = true } repository = { workspace = true } +version = { workspace = true } [lib] crate-type = ["cdylib", "rlib"] @@ -26,7 +26,7 @@ cw-utils = { workspace = true } cw20-base = { workspace = true, features = ["library"] } cw2 = { workspace = true } thiserror = { workspace = true } -cw-paginate = { workspace = true } +cw-paginate-storage = { workspace = true } cw-ownable = { workspace = true } cw20-stake-v1 = { workspace = true, features = ["library"] } diff --git a/contracts/staking/cw20-stake/schema/cw20-stake.json b/contracts/staking/cw20-stake/schema/cw20-stake.json index c4729caab..285f8387a 100644 --- a/contracts/staking/cw20-stake/schema/cw20-stake.json +++ b/contracts/staking/cw20-stake/schema/cw20-stake.json @@ -1,6 +1,6 @@ { "contract_name": "cw20-stake", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/staking/cw20-stake/src/contract.rs b/contracts/staking/cw20-stake/src/contract.rs index ad4aea120..d25417f87 100644 --- a/contracts/staking/cw20-stake/src/contract.rs +++ b/contracts/staking/cw20-stake/src/contract.rs @@ -452,7 +452,7 @@ pub fn query_list_stakers( .map(|addr| deps.api.addr_validate(&addr)) .transpose()?; - let stakers = cw_paginate::paginate_snapshot_map( + let stakers = cw_paginate_storage::paginate_snapshot_map( deps, &STAKED_BALANCES, start_at.as_ref(), diff --git a/contracts/voting/dao-voting-cw20-staked/Cargo.toml b/contracts/voting/dao-voting-cw20-staked/Cargo.toml index 143da5454..43ccc1449 100644 --- a/contracts/voting/dao-voting-cw20-staked/Cargo.toml +++ b/contracts/voting/dao-voting-cw20-staked/Cargo.toml @@ -25,7 +25,7 @@ cw2 = { workspace = true } cw20 = { workspace = true } cw-utils = { workspace = true } thiserror = { workspace = true } -dao-macros = { workspace = true } +dao-dao-macros = { workspace = true } dao-interface = { workspace = true } cw20-stake = { workspace = true } cw20-base = { workspace = true, features = ["library"] } diff --git a/contracts/voting/dao-voting-cw20-staked/schema/dao-voting-cw20-staked.json b/contracts/voting/dao-voting-cw20-staked/schema/dao-voting-cw20-staked.json index 5dfe64bc6..64a919c22 100644 --- a/contracts/voting/dao-voting-cw20-staked/schema/dao-voting-cw20-staked.json +++ b/contracts/voting/dao-voting-cw20-staked/schema/dao-voting-cw20-staked.json @@ -1,6 +1,6 @@ { "contract_name": "dao-voting-cw20-staked", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/voting/dao-voting-cw20-staked/src/msg.rs b/contracts/voting/dao-voting-cw20-staked/src/msg.rs index b25a9a200..1b0564c84 100644 --- a/contracts/voting/dao-voting-cw20-staked/src/msg.rs +++ b/contracts/voting/dao-voting-cw20-staked/src/msg.rs @@ -4,7 +4,7 @@ use cw20::Cw20Coin; use cw20_base::msg::InstantiateMarketingInfo; use cw_utils::Duration; -use dao_macros::{active_query, token_query, voting_module_query}; +use dao_dao_macros::{active_query, token_query, voting_module_query}; /// Information about the staking contract to be used with this voting /// module. diff --git a/contracts/voting/dao-voting-cw4/Cargo.toml b/contracts/voting/dao-voting-cw4/Cargo.toml index 160aa8cd3..dbe6c6718 100644 --- a/contracts/voting/dao-voting-cw4/Cargo.toml +++ b/contracts/voting/dao-voting-cw4/Cargo.toml @@ -24,7 +24,7 @@ cw2 = { workspace = true } cw-utils = { workspace = true } cosmwasm-schema = { workspace = true } thiserror = { workspace = true } -dao-macros = { workspace = true } +dao-dao-macros = { workspace = true } dao-interface = { workspace = true } cw4 = { workspace = true } cw4-group = { workspace = true } diff --git a/contracts/voting/dao-voting-cw4/schema/dao-voting-cw4.json b/contracts/voting/dao-voting-cw4/schema/dao-voting-cw4.json index bc3b1759e..829fd9e25 100644 --- a/contracts/voting/dao-voting-cw4/schema/dao-voting-cw4.json +++ b/contracts/voting/dao-voting-cw4/schema/dao-voting-cw4.json @@ -1,6 +1,6 @@ { "contract_name": "dao-voting-cw4", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/voting/dao-voting-cw4/src/msg.rs b/contracts/voting/dao-voting-cw4/src/msg.rs index 8210bb953..9ef904698 100644 --- a/contracts/voting/dao-voting-cw4/src/msg.rs +++ b/contracts/voting/dao-voting-cw4/src/msg.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; -use dao_macros::voting_module_query; +use dao_dao_macros::voting_module_query; #[cw_serde] pub struct InstantiateMsg { diff --git a/contracts/voting/dao-voting-cw721-staked/Cargo.toml b/contracts/voting/dao-voting-cw721-staked/Cargo.toml index 884db9fa0..0401b42ad 100644 --- a/contracts/voting/dao-voting-cw721-staked/Cargo.toml +++ b/contracts/voting/dao-voting-cw721-staked/Cargo.toml @@ -19,10 +19,10 @@ cosmwasm-std = { workspace = true } cosmwasm-schema = { workspace = true } cw-storage-plus = { workspace = true } cw-controllers = { workspace = true } -dao-macros = { workspace = true } +dao-dao-macros = { workspace = true } dao-interface = { workspace = true } cw721-controllers = { workspace = true } -cw-paginate = { workspace = true } +cw-paginate-storage = { workspace = true } cw721 = { workspace = true } cw-utils = { workspace = true } cw2 = { workspace = true } diff --git a/contracts/voting/dao-voting-cw721-staked/schema/dao-voting-cw721-staked.json b/contracts/voting/dao-voting-cw721-staked/schema/dao-voting-cw721-staked.json index 78e04e12d..3287915f8 100644 --- a/contracts/voting/dao-voting-cw721-staked/schema/dao-voting-cw721-staked.json +++ b/contracts/voting/dao-voting-cw721-staked/schema/dao-voting-cw721-staked.json @@ -1,6 +1,6 @@ { "contract_name": "dao-voting-cw721-staked", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/voting/dao-voting-cw721-staked/src/contract.rs b/contracts/voting/dao-voting-cw721-staked/src/contract.rs index 9a601020f..1afd033c8 100644 --- a/contracts/voting/dao-voting-cw721-staked/src/contract.rs +++ b/contracts/voting/dao-voting-cw721-staked/src/contract.rs @@ -14,7 +14,7 @@ use cw2::set_contract_version; use cw721::Cw721ReceiveMsg; use cw_storage_plus::Bound; use cw_utils::Duration; -use dao_interface::Admin; +use dao_interface::state::Admin; pub(crate) const CONTRACT_NAME: &str = "crates.io:dao-voting-cw721-staked"; pub(crate) const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/contracts/voting/dao-voting-cw721-staked/src/msg.rs b/contracts/voting/dao-voting-cw721-staked/src/msg.rs index b0bd1073b..bf6012e5c 100644 --- a/contracts/voting/dao-voting-cw721-staked/src/msg.rs +++ b/contracts/voting/dao-voting-cw721-staked/src/msg.rs @@ -1,8 +1,8 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; use cw721::Cw721ReceiveMsg; use cw_utils::Duration; -use dao_interface::Admin; -use dao_macros::voting_module_query; +use dao_dao_macros::voting_module_query; +use dao_interface::state::Admin; #[cw_serde] pub struct InstantiateMsg { diff --git a/contracts/voting/dao-voting-cw721-staked/src/testing/mod.rs b/contracts/voting/dao-voting-cw721-staked/src/testing/mod.rs index bbb9907b5..68fb1a9c0 100644 --- a/contracts/voting/dao-voting-cw721-staked/src/testing/mod.rs +++ b/contracts/voting/dao-voting-cw721-staked/src/testing/mod.rs @@ -8,7 +8,7 @@ use cosmwasm_std::Addr; use cw_multi_test::{App, Executor}; use cw_utils::Duration; -use dao_interface::Admin; +use dao_interface::state::Admin; use dao_testing::contracts::voting_cw721_staked_contract; use crate::msg::InstantiateMsg; diff --git a/contracts/voting/dao-voting-cw721-staked/src/testing/tests.rs b/contracts/voting/dao-voting-cw721-staked/src/testing/tests.rs index 809a36c06..2ca2debb8 100644 --- a/contracts/voting/dao-voting-cw721-staked/src/testing/tests.rs +++ b/contracts/voting/dao-voting-cw721-staked/src/testing/tests.rs @@ -2,7 +2,7 @@ use cosmwasm_std::Uint128; use cw721_controllers::{NftClaim, NftClaimsResponse}; use cw_multi_test::next_block; use cw_utils::Duration; -use dao_interface::Admin; +use dao_interface::state::Admin; use crate::{ state::{Config, MAX_CLAIMS}, diff --git a/contracts/voting/dao-voting-native-staked/Cargo.toml b/contracts/voting/dao-voting-native-staked/Cargo.toml index 56c6b4b05..495e4b215 100644 --- a/contracts/voting/dao-voting-native-staked/Cargo.toml +++ b/contracts/voting/dao-voting-native-staked/Cargo.toml @@ -26,9 +26,9 @@ cw-utils = { workspace = true } cw-controllers = { workspace = true } thiserror = { workspace = true } -dao-macros = { workspace = true } +dao-dao-macros = { workspace = true } dao-interface = { workspace = true } -cw-paginate = { workspace = true } +cw-paginate-storage = { workspace = true } [dev-dependencies] cw-multi-test = { workspace = true } diff --git a/contracts/voting/dao-voting-native-staked/schema/dao-voting-native-staked.json b/contracts/voting/dao-voting-native-staked/schema/dao-voting-native-staked.json index 8707b4a50..f553cbbab 100644 --- a/contracts/voting/dao-voting-native-staked/schema/dao-voting-native-staked.json +++ b/contracts/voting/dao-voting-native-staked/schema/dao-voting-native-staked.json @@ -1,6 +1,6 @@ { "contract_name": "dao-voting-native-staked", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/voting/dao-voting-native-staked/src/contract.rs b/contracts/voting/dao-voting-native-staked/src/contract.rs index b3f80ae86..eb93fa0fe 100644 --- a/contracts/voting/dao-voting-native-staked/src/contract.rs +++ b/contracts/voting/dao-voting-native-staked/src/contract.rs @@ -7,8 +7,8 @@ use cosmwasm_std::{ use cw2::set_contract_version; use cw_controllers::ClaimsResponse; use cw_utils::{must_pay, Duration}; +use dao_interface::state::Admin; use dao_interface::voting::{TotalPowerAtHeightResponse, VotingPowerAtHeightResponse}; -use dao_interface::Admin; use crate::error::ContractError; use crate::msg::{ @@ -341,7 +341,7 @@ pub fn query_list_stakers( .map(|addr| deps.api.addr_validate(&addr)) .transpose()?; - let stakers = cw_paginate::paginate_snapshot_map( + let stakers = cw_paginate_storage::paginate_snapshot_map( deps, &STAKED_BALANCES, start_at.as_ref(), diff --git a/contracts/voting/dao-voting-native-staked/src/msg.rs b/contracts/voting/dao-voting-native-staked/src/msg.rs index 2eef8cf3c..bf836ca12 100644 --- a/contracts/voting/dao-voting-native-staked/src/msg.rs +++ b/contracts/voting/dao-voting-native-staked/src/msg.rs @@ -1,8 +1,8 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::Uint128; use cw_utils::Duration; -use dao_interface::Admin; -use dao_macros::voting_module_query; +use dao_dao_macros::voting_module_query; +use dao_interface::state::Admin; #[cw_serde] pub struct InstantiateMsg { diff --git a/contracts/voting/dao-voting-native-staked/src/tests.rs b/contracts/voting/dao-voting-native-staked/src/tests.rs index 3ff524b9b..b6973ff33 100644 --- a/contracts/voting/dao-voting-native-staked/src/tests.rs +++ b/contracts/voting/dao-voting-native-staked/src/tests.rs @@ -10,10 +10,10 @@ use cw_multi_test::{ custom_app, next_block, App, AppResponse, Contract, ContractWrapper, Executor, }; use cw_utils::Duration; +use dao_interface::state::Admin; use dao_interface::voting::{ InfoResponse, TotalPowerAtHeightResponse, VotingPowerAtHeightResponse, }; -use dao_interface::Admin; const DAO_ADDR: &str = "dao"; const ADDR1: &str = "addr1"; diff --git a/packages/cw-hooks/src/lib.rs b/packages/cw-hooks/src/lib.rs index 14bff3082..334b88e44 100644 --- a/packages/cw-hooks/src/lib.rs +++ b/packages/cw-hooks/src/lib.rs @@ -33,7 +33,7 @@ impl<'a> Hooks<'a> { pub fn add_hook(&self, storage: &mut dyn Storage, addr: Addr) -> Result<(), HookError> { let mut hooks = self.0.may_load(storage)?.unwrap_or_default(); - if !hooks.iter().any(|h| h == &addr) { + if !hooks.iter().any(|h| h == addr) { hooks.push(addr); } else { return Err(HookError::HookAlreadyRegistered {}); @@ -43,7 +43,7 @@ impl<'a> Hooks<'a> { pub fn remove_hook(&self, storage: &mut dyn Storage, addr: Addr) -> Result<(), HookError> { let mut hooks = self.0.load(storage)?; - if let Some(p) = hooks.iter().position(|x| x == &addr) { + if let Some(p) = hooks.iter().position(|h| h == addr) { hooks.remove(p); } else { return Err(HookError::HookNotRegistered {}); diff --git a/packages/cw-paginate/Cargo.toml b/packages/cw-paginate-storage/Cargo.toml similarity index 93% rename from packages/cw-paginate/Cargo.toml rename to packages/cw-paginate-storage/Cargo.toml index 5b3150b23..dbe83025a 100644 --- a/packages/cw-paginate/Cargo.toml +++ b/packages/cw-paginate-storage/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "cw-paginate" +name = "cw-paginate-storage" authors = ["ekez ekez@withoutdoing.com"] description = "A package for paginating cosmwasm maps." edition = { workspace = true } diff --git a/packages/cw-paginate/README.md b/packages/cw-paginate-storage/README.md similarity index 93% rename from packages/cw-paginate/README.md rename to packages/cw-paginate-storage/README.md index 51a178a3d..03a9d03eb 100644 --- a/packages/cw-paginate/README.md +++ b/packages/cw-paginate-storage/README.md @@ -20,7 +20,7 @@ You can use this package to write a query to list it's contents like: ```rust use cosmwasm_std::{Deps, Binary, to_binary, StdResult}; use cw_storage_plus::Map; -use cw_paginate::paginate_map; +use cw_paginate_storage::paginate_map; pub const ITEMS: Map = Map::new("items"); diff --git a/packages/cw-paginate/src/lib.rs b/packages/cw-paginate-storage/src/lib.rs similarity index 100% rename from packages/cw-paginate/src/lib.rs rename to packages/cw-paginate-storage/src/lib.rs diff --git a/packages/dao-macros/.cargo/config b/packages/dao-dao-macros/.cargo/config similarity index 100% rename from packages/dao-macros/.cargo/config rename to packages/dao-dao-macros/.cargo/config diff --git a/packages/dao-macros/Cargo.toml b/packages/dao-dao-macros/Cargo.toml similarity index 96% rename from packages/dao-macros/Cargo.toml rename to packages/dao-dao-macros/Cargo.toml index 273aa2711..0d9a0f52b 100644 --- a/packages/dao-macros/Cargo.toml +++ b/packages/dao-dao-macros/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "dao-macros" +name = "dao-dao-macros" authors = ["ekez ekez@withoutdoing.com"] description = "A package macros for deriving DAO module interfaces." edition = { workspace = true } diff --git a/packages/dao-macros/README.md b/packages/dao-dao-macros/README.md similarity index 89% rename from packages/dao-macros/README.md rename to packages/dao-dao-macros/README.md index d9ec67b37..404f8acda 100644 --- a/packages/dao-macros/README.md +++ b/packages/dao-dao-macros/README.md @@ -6,7 +6,7 @@ the voting module interface on an enum: ```rust use cosmwasm_schema::{cw_serde, QueryResponses}; -use dao_macros::{token_query, voting_module_query}; +use dao_dao_macros::{token_query, voting_module_query}; use dao_interface::voting::TotalPowerAtHeightResponse; use dao_interface::voting::VotingPowerAtHeightResponse; diff --git a/packages/dao-macros/src/lib.rs b/packages/dao-dao-macros/src/lib.rs similarity index 96% rename from packages/dao-macros/src/lib.rs rename to packages/dao-dao-macros/src/lib.rs index 1535636c0..4c11c8b71 100644 --- a/packages/dao-macros/src/lib.rs +++ b/packages/dao-dao-macros/src/lib.rs @@ -64,7 +64,7 @@ fn dao_interface_path(inside: &str) -> Path { /// For example: /// /// ``` -/// use dao_macros::voting_module_query; +/// use dao_dao_macros::voting_module_query; /// use cosmwasm_schema::{cw_serde, QueryResponses}; /// use dao_interface::voting::TotalPowerAtHeightResponse; /// use dao_interface::voting::VotingPowerAtHeightResponse; @@ -98,7 +98,7 @@ fn dao_interface_path(inside: &str) -> Path { /// occurs before the addition of the field. /// /// ```compile_fail -/// use dao_macros::voting_module_query; +/// use dao_dao_macros::voting_module_query; /// use cosmwasm_schema::{cw_serde, QueryResponses}; /// use dao_interface::voting::TotalPowerAtHeightResponse; /// use dao_interface::voting::VotingPowerAtHeightResponse; @@ -157,7 +157,7 @@ pub fn voting_module_query(metadata: TokenStream, input: TokenStream) -> TokenSt /// For example: /// /// ``` -/// use dao_macros::token_query; +/// use dao_dao_macros::token_query; /// use cosmwasm_schema::{cw_serde, QueryResponses}; /// use cosmwasm_std::Addr; /// @@ -181,7 +181,7 @@ pub fn voting_module_query(metadata: TokenStream, input: TokenStream) -> TokenSt /// occurs before the addition of the field. /// /// ```compile_fail -/// use dao_macros::token_query; +/// use dao_dao_macros::token_query; /// use cosmwasm_schema::{cw_serde, QueryResponses}; /// /// #[derive(Clone)] @@ -217,7 +217,7 @@ pub fn token_query(metadata: TokenStream, input: TokenStream) -> TokenStream { /// For example: /// /// ``` -/// use dao_macros::active_query; +/// use dao_dao_macros::active_query; /// use cosmwasm_schema::{cw_serde, QueryResponses}; /// /// #[active_query] @@ -240,7 +240,7 @@ pub fn token_query(metadata: TokenStream, input: TokenStream) -> TokenStream { /// occurs before the addition of the field. /// /// ```compile_fail -/// use dao_macros::active_query; +/// use dao_dao_macros::active_query; /// /// #[derive(Clone)] /// #[active_query] @@ -272,7 +272,7 @@ pub fn active_query(metadata: TokenStream, input: TokenStream) -> TokenStream { /// For example: /// /// ``` -/// use dao_macros::proposal_module_query; +/// use dao_dao_macros::proposal_module_query; /// use cosmwasm_schema::{cw_serde, QueryResponses}; /// use cosmwasm_std::Addr; /// @@ -299,7 +299,7 @@ pub fn active_query(metadata: TokenStream, input: TokenStream) -> TokenStream { /// occurs before the addition of the field. /// /// ```compile_fail -/// use dao_macros::proposal_module_query; +/// use dao_dao_macros::proposal_module_query; /// use cosmwasm_schema::{cw_serde, QueryResponses}; /// use cosmwasm_std::Addr; /// @@ -343,7 +343,7 @@ pub fn proposal_module_query(metadata: TokenStream, input: TokenStream) -> Token /// time. For example, the following will not compile: /// /// ```compile_fail -/// use dao_macros::limit_variant_count; +/// use dao_dao_macros::limit_variant_count; /// /// #[limit_variant_count(1)] /// enum Two { diff --git a/packages/dao-macros/tests/govmod.rs b/packages/dao-dao-macros/tests/govmod.rs similarity index 92% rename from packages/dao-macros/tests/govmod.rs rename to packages/dao-dao-macros/tests/govmod.rs index cc88aded5..f69d281cb 100644 --- a/packages/dao-macros/tests/govmod.rs +++ b/packages/dao-dao-macros/tests/govmod.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; -use dao_macros::proposal_module_query; +use dao_dao_macros::proposal_module_query; #[proposal_module_query] #[allow(dead_code)] diff --git a/packages/dao-macros/tests/voting.rs b/packages/dao-dao-macros/tests/voting.rs similarity index 95% rename from packages/dao-macros/tests/voting.rs rename to packages/dao-dao-macros/tests/voting.rs index 06e933148..ad2816c82 100644 --- a/packages/dao-macros/tests/voting.rs +++ b/packages/dao-dao-macros/tests/voting.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; -use dao_macros::voting_module_query; +use dao_dao_macros::voting_module_query; /// enum for testing. Important that this derives things / has other /// attributes so we can be sure we aren't messing with other macros diff --git a/packages/dao-interface/Cargo.toml b/packages/dao-interface/Cargo.toml index 2f736a3e4..c82abc5e4 100644 --- a/packages/dao-interface/Cargo.toml +++ b/packages/dao-interface/Cargo.toml @@ -10,9 +10,11 @@ version = { workspace = true } [dependencies] cosmwasm-std = { workspace = true } cosmwasm-schema = { workspace = true } -dao-macros = { workspace = true } cw2 = { workspace = true } +cw20 = { workspace = true } +cw721 = { workspace = true } cw-hooks = { workspace = true } +cw-utils = { workspace = true } [dev-dependencies] cosmwasm-schema = { workspace = true } diff --git a/packages/dao-interface/src/lib.rs b/packages/dao-interface/src/lib.rs index 5fa6ffda6..f46f381c2 100644 --- a/packages/dao-interface/src/lib.rs +++ b/packages/dao-interface/src/lib.rs @@ -1,129 +1,8 @@ #![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/README.md"))] -use cosmwasm_schema::cw_serde; -use cosmwasm_std::{Addr, Binary, CosmosMsg, Empty, WasmMsg}; - +pub mod migrate_msg; +pub mod msg; pub mod proposal; +pub mod query; +pub mod state; pub mod voting; - -/// The cw-core interface. -#[cw_serde] -pub enum ExecuteMsg { - /// Causes the core module to execute all of MSGS in order. Only - /// callabale by a proposal module.1 - ExecuteProposalHook { msgs: Vec> }, -} - -/// Information about the CosmWasm level admin of a contract. Used in -/// conjunction with `ModuleInstantiateInfo` to instantiate modules. -#[cw_serde] -pub enum Admin { - /// Set the admin to a specified address. - Address { addr: String }, - /// Sets the admin as the core module address. - CoreModule {}, -} - -/// Information needed to instantiate a module. -#[cw_serde] -pub struct ModuleInstantiateInfo { - /// Code ID of the contract to be instantiated. - pub code_id: u64, - /// Instantiate message to be used to create the contract. - pub msg: Binary, - /// CosmWasm level admin of the instantiated contract. See: - /// - pub admin: Option, - /// Label for the instantiated contract. - pub label: String, -} - -impl ModuleInstantiateInfo { - pub fn into_wasm_msg(self, dao: Addr) -> WasmMsg { - WasmMsg::Instantiate { - admin: self.admin.map(|admin| match admin { - Admin::Address { addr } => addr, - Admin::CoreModule {} => dao.into_string(), - }), - code_id: self.code_id, - msg: self.msg, - funds: vec![], - label: self.label, - } - } -} - -/// Callbacks to be executed when a module is instantiated -#[cw_serde] -pub struct ModuleInstantiateCallback { - pub msgs: Vec, -} - -#[cfg(test)] -mod tests { - use cosmwasm_std::{to_binary, Addr, WasmMsg}; - - use crate::{Admin, ModuleInstantiateInfo}; - - #[test] - fn test_module_instantiate_admin_none() { - let no_admin = ModuleInstantiateInfo { - code_id: 42, - msg: to_binary("foo").unwrap(), - admin: None, - label: "bar".to_string(), - }; - assert_eq!( - no_admin.into_wasm_msg(Addr::unchecked("ekez")), - WasmMsg::Instantiate { - admin: None, - code_id: 42, - msg: to_binary("foo").unwrap(), - funds: vec![], - label: "bar".to_string() - } - ) - } - - #[test] - fn test_module_instantiate_admin_addr() { - let no_admin = ModuleInstantiateInfo { - code_id: 42, - msg: to_binary("foo").unwrap(), - admin: Some(Admin::Address { - addr: "core".to_string(), - }), - label: "bar".to_string(), - }; - assert_eq!( - no_admin.into_wasm_msg(Addr::unchecked("ekez")), - WasmMsg::Instantiate { - admin: Some("core".to_string()), - code_id: 42, - msg: to_binary("foo").unwrap(), - funds: vec![], - label: "bar".to_string() - } - ) - } - - #[test] - fn test_module_instantiate_instantiator_addr() { - let no_admin = ModuleInstantiateInfo { - code_id: 42, - msg: to_binary("foo").unwrap(), - admin: Some(Admin::CoreModule {}), - label: "bar".to_string(), - }; - assert_eq!( - no_admin.into_wasm_msg(Addr::unchecked("ekez")), - WasmMsg::Instantiate { - admin: Some("ekez".to_string()), - code_id: 42, - msg: to_binary("foo").unwrap(), - funds: vec![], - label: "bar".to_string() - } - ) - } -} diff --git a/contracts/dao-core/src/migrate_msg.rs b/packages/dao-interface/src/migrate_msg.rs similarity index 97% rename from contracts/dao-core/src/migrate_msg.rs rename to packages/dao-interface/src/migrate_msg.rs index 955a1ff26..a9175a379 100644 --- a/contracts/dao-core/src/migrate_msg.rs +++ b/packages/dao-interface/src/migrate_msg.rs @@ -2,9 +2,9 @@ //! copyo of the types from dao-migrator contract. use cosmwasm_schema::cw_serde; -use dao_interface::ModuleInstantiateInfo; use crate::query::SubDao; +use crate::state::ModuleInstantiateInfo; #[cw_serde] pub struct MigrateParams { diff --git a/packages/dao-interface/src/msg.rs b/packages/dao-interface/src/msg.rs new file mode 100644 index 000000000..797865c2e --- /dev/null +++ b/packages/dao-interface/src/msg.rs @@ -0,0 +1,240 @@ +use cosmwasm_schema::{cw_serde, QueryResponses}; +use cosmwasm_std::{CosmosMsg, Empty}; +use cw_utils::Duration; + +use crate::state::Config; +use crate::{migrate_msg::MigrateParams, query::SubDao, state::ModuleInstantiateInfo}; + +/// Information about an item to be stored in the items list. +#[cw_serde] +pub struct InitialItem { + /// The name of the item. + pub key: String, + /// The value the item will have at instantiation time. + pub value: String, +} + +#[cw_serde] +pub struct InstantiateMsg { + /// Optional Admin with the ability to execute DAO messages + /// directly. Useful for building SubDAOs controlled by a parent + /// DAO. If no admin is specified the contract is set as its own + /// admin so that the admin may be updated later by governance. + pub admin: Option, + /// The name of the core contract. + pub name: String, + /// A description of the core contract. + pub description: String, + /// An image URL to describe the core module contract. + pub image_url: Option, + + /// If true the contract will automatically add received cw20 + /// tokens to its treasury. + pub automatically_add_cw20s: bool, + /// If true the contract will automatically add received cw721 + /// tokens to its treasury. + pub automatically_add_cw721s: bool, + + /// Instantiate information for the core contract's voting + /// power module. + pub voting_module_instantiate_info: ModuleInstantiateInfo, + /// Instantiate information for the core contract's proposal modules. + /// NOTE: the pre-propose-base package depends on it being the case + /// that the core module instantiates its proposal module. + pub proposal_modules_instantiate_info: Vec, + + /// The items to instantiate this DAO with. Items are arbitrary + /// key-value pairs whose contents are controlled by governance. + /// + /// It is an error to provide two items with the same key. + pub initial_items: Option>, + /// Implements the DAO Star standard: + pub dao_uri: Option, +} + +#[cw_serde] +pub enum ExecuteMsg { + /// Callable by the Admin, if one is configured. + /// Executes messages in order. + ExecuteAdminMsgs { msgs: Vec> }, + /// Callable by proposal modules. The DAO will execute the + /// messages in the hook in order. + ExecuteProposalHook { msgs: Vec> }, + /// Pauses the DAO for a set duration. + /// When paused the DAO is unable to execute proposals + Pause { duration: Duration }, + /// Executed when the contract receives a cw20 token. Depending on + /// the contract's configuration the contract will automatically + /// add the token to its treasury. + Receive(cw20::Cw20ReceiveMsg), + /// Executed when the contract receives a cw721 token. Depending + /// on the contract's configuration the contract will + /// automatically add the token to its treasury. + ReceiveNft(cw721::Cw721ReceiveMsg), + /// Removes an item from the governance contract's item map. + RemoveItem { key: String }, + /// Adds an item to the governance contract's item map. If the + /// item already exists the existing value is overridden. If the + /// item does not exist a new item is added. + SetItem { key: String, value: String }, + /// Callable by the admin of the contract. If ADMIN is None the + /// admin is set as the contract itself so that it may be updated + /// later by vote. If ADMIN is Some a new admin is proposed and + /// that new admin may become the admin by executing the + /// `AcceptAdminNomination` message. + /// + /// If there is already a pending admin nomination the + /// `WithdrawAdminNomination` message must be executed before a + /// new admin may be nominated. + NominateAdmin { admin: Option }, + /// Callable by a nominated admin. Admins are nominated via the + /// `NominateAdmin` message. Accepting a nomination will make the + /// nominated address the new admin. + /// + /// Requiring that the new admin accepts the nomination before + /// becoming the admin protects against a typo causing the admin + /// to change to an invalid address. + AcceptAdminNomination {}, + /// Callable by the current admin. Withdraws the current admin + /// nomination. + WithdrawAdminNomination {}, + /// Callable by the core contract. Replaces the current + /// governance contract config with the provided config. + UpdateConfig { config: Config }, + /// Updates the list of cw20 tokens this contract has registered. + UpdateCw20List { + to_add: Vec, + to_remove: Vec, + }, + /// Updates the list of cw721 tokens this contract has registered. + UpdateCw721List { + to_add: Vec, + to_remove: Vec, + }, + /// Updates the governance contract's governance modules. Module + /// instantiate info in `to_add` is used to create new modules and + /// install them. + UpdateProposalModules { + /// NOTE: the pre-propose-base package depends on it being the + /// case that the core module instantiates its proposal module. + to_add: Vec, + to_disable: Vec, + }, + /// Callable by the core contract. Replaces the current + /// voting module with a new one instantiated by the governance + /// contract. + UpdateVotingModule { module: ModuleInstantiateInfo }, + /// Update the core module to add/remove SubDAOs and their charters + UpdateSubDaos { + to_add: Vec, + to_remove: Vec, + }, +} + +#[cw_serde] +#[derive(QueryResponses)] +pub enum QueryMsg { + /// Get's the DAO's admin. Returns `Addr`. + #[returns(cosmwasm_std::Addr)] + Admin {}, + /// Get's the currently nominated admin (if any). + #[returns(crate::query::AdminNominationResponse)] + AdminNomination {}, + /// Gets the contract's config. + #[returns(Config)] + Config {}, + /// Gets the token balance for each cw20 registered with the + /// contract. + #[returns(crate::query::Cw20BalanceResponse)] + Cw20Balances { + start_after: Option, + limit: Option, + }, + /// Lists the addresses of the cw20 tokens in this contract's + /// treasury. + #[returns(Vec)] + Cw20TokenList { + start_after: Option, + limit: Option, + }, + /// Lists the addresses of the cw721 tokens in this contract's + /// treasury. + #[returns(Vec)] + Cw721TokenList { + start_after: Option, + limit: Option, + }, + /// Dumps all of the core contract's state in a single + /// query. Useful for frontends as performance for queries is more + /// limited by network times than compute times. + #[returns(crate::query::DumpStateResponse)] + DumpState {}, + /// Gets the address associated with an item key. + #[returns(crate::query::GetItemResponse)] + GetItem { key: String }, + /// Lists all of the items associted with the contract. For + /// example, given the items `{ "group": "foo", "subdao": "bar"}` + /// this query would return `[("group", "foo"), ("subdao", + /// "bar")]`. + #[returns(Vec)] + ListItems { + start_after: Option, + limit: Option, + }, + /// Returns contract version info + #[returns(crate::voting::InfoResponse)] + Info {}, + /// Gets all proposal modules associated with the + /// contract. + #[returns(Vec)] + ProposalModules { + start_after: Option, + limit: Option, + }, + /// Gets the active proposal modules associated with the + /// contract. + #[returns(Vec)] + ActiveProposalModules { + start_after: Option, + limit: Option, + }, + /// Gets the number of active and total proposal modules + /// registered with this module. + #[returns(crate::query::ProposalModuleCountResponse)] + ProposalModuleCount {}, + /// Returns information about if the contract is currently paused. + #[returns(crate::query::PauseInfoResponse)] + PauseInfo {}, + /// Gets the contract's voting module. + #[returns(cosmwasm_std::Addr)] + VotingModule {}, + /// Returns all SubDAOs with their charters in a vec. + /// start_after is bound exclusive and asks for a string address. + #[returns(Vec)] + ListSubDaos { + start_after: Option, + limit: Option, + }, + /// Implements the DAO Star standard: + #[returns(crate::query::DaoURIResponse)] + DaoURI {}, + /// Returns the voting power for an address at a given height. + #[returns(crate::voting::VotingPowerAtHeightResponse)] + VotingPowerAtHeight { + address: String, + height: Option, + }, + /// Returns the total voting power at a given block height. + #[returns(crate::voting::TotalPowerAtHeightResponse)] + TotalPowerAtHeight { height: Option }, +} + +#[allow(clippy::large_enum_variant)] +#[cw_serde] +pub enum MigrateMsg { + FromV1 { + dao_uri: Option, + params: Option, + }, + FromCompatible {}, +} diff --git a/packages/dao-interface/src/proposal.rs b/packages/dao-interface/src/proposal.rs index 848ad45fa..77076d5c2 100644 --- a/packages/dao-interface/src/proposal.rs +++ b/packages/dao-interface/src/proposal.rs @@ -1,10 +1,25 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; -use dao_macros::proposal_module_query; +use cw2::ContractVersion; + +#[cw_serde] +pub struct InfoResponse { + pub info: ContractVersion, +} -#[proposal_module_query] #[cw_serde] #[derive(QueryResponses)] -pub enum Query {} +pub enum Query { + /// Returns the address of the DAO this module belongs to + #[returns(::cosmwasm_std::Addr)] + Dao {}, + /// Returns contract version info + #[returns(InfoResponse)] + Info {}, + /// Returns the proposal ID that will be assigned to the + /// next proposal created. + #[returns(::std::primitive::u64)] + NextProposalId {}, +} mod tests { /// Make sure the enum has all of the fields we expect. This will diff --git a/contracts/dao-core/src/query.rs b/packages/dao-interface/src/query.rs similarity index 100% rename from contracts/dao-core/src/query.rs rename to packages/dao-interface/src/query.rs diff --git a/packages/dao-interface/src/state.rs b/packages/dao-interface/src/state.rs new file mode 100644 index 000000000..3a0841f9b --- /dev/null +++ b/packages/dao-interface/src/state.rs @@ -0,0 +1,155 @@ +use cosmwasm_schema::cw_serde; +use cosmwasm_std::{Addr, Binary, CosmosMsg, WasmMsg}; + +/// Top level config type for core module. +#[cw_serde] +pub struct Config { + /// The name of the contract. + pub name: String, + /// A description of the contract. + pub description: String, + /// An optional image URL for displaying alongside the contract. + pub image_url: Option, + /// If true the contract will automatically add received cw20 + /// tokens to its treasury. + pub automatically_add_cw20s: bool, + /// If true the contract will automatically add received cw721 + /// tokens to its treasury. + pub automatically_add_cw721s: bool, + /// The URI for the DAO as defined by the DAOstar standard + /// + pub dao_uri: Option, +} + +/// Top level type describing a proposal module. +#[cw_serde] +pub struct ProposalModule { + /// The address of the proposal module. + pub address: Addr, + /// The URL prefix of this proposal module as derived from the module ID. + /// Prefixes are mapped to letters, e.g. 0 is 'A', and 26 is 'AA'. + pub prefix: String, + /// The status of the proposal module, e.g. 'Enabled' or 'Disabled.' + pub status: ProposalModuleStatus, +} + +/// The status of a proposal module. +#[cw_serde] +pub enum ProposalModuleStatus { + Enabled, + Disabled, +} + +/// Information about the CosmWasm level admin of a contract. Used in +/// conjunction with `ModuleInstantiateInfo` to instantiate modules. +#[cw_serde] +pub enum Admin { + /// Set the admin to a specified address. + Address { addr: String }, + /// Sets the admin as the core module address. + CoreModule {}, +} + +/// Information needed to instantiate a module. +#[cw_serde] +pub struct ModuleInstantiateInfo { + /// Code ID of the contract to be instantiated. + pub code_id: u64, + /// Instantiate message to be used to create the contract. + pub msg: Binary, + /// CosmWasm level admin of the instantiated contract. See: + /// + pub admin: Option, + /// Label for the instantiated contract. + pub label: String, +} + +impl ModuleInstantiateInfo { + pub fn into_wasm_msg(self, dao: Addr) -> WasmMsg { + WasmMsg::Instantiate { + admin: self.admin.map(|admin| match admin { + Admin::Address { addr } => addr, + Admin::CoreModule {} => dao.into_string(), + }), + code_id: self.code_id, + msg: self.msg, + funds: vec![], + label: self.label, + } + } +} + +/// Callbacks to be executed when a module is instantiated +#[cw_serde] +pub struct ModuleInstantiateCallback { + pub msgs: Vec, +} + +#[cfg(test)] +mod tests { + use super::*; + + use cosmwasm_std::{to_binary, Addr, WasmMsg}; + + #[test] + fn test_module_instantiate_admin_none() { + let no_admin = ModuleInstantiateInfo { + code_id: 42, + msg: to_binary("foo").unwrap(), + admin: None, + label: "bar".to_string(), + }; + assert_eq!( + no_admin.into_wasm_msg(Addr::unchecked("ekez")), + WasmMsg::Instantiate { + admin: None, + code_id: 42, + msg: to_binary("foo").unwrap(), + funds: vec![], + label: "bar".to_string() + } + ) + } + + #[test] + fn test_module_instantiate_admin_addr() { + let no_admin = ModuleInstantiateInfo { + code_id: 42, + msg: to_binary("foo").unwrap(), + admin: Some(Admin::Address { + addr: "core".to_string(), + }), + label: "bar".to_string(), + }; + assert_eq!( + no_admin.into_wasm_msg(Addr::unchecked("ekez")), + WasmMsg::Instantiate { + admin: Some("core".to_string()), + code_id: 42, + msg: to_binary("foo").unwrap(), + funds: vec![], + label: "bar".to_string() + } + ) + } + + #[test] + fn test_module_instantiate_instantiator_addr() { + let no_admin = ModuleInstantiateInfo { + code_id: 42, + msg: to_binary("foo").unwrap(), + admin: Some(Admin::CoreModule {}), + label: "bar".to_string(), + }; + assert_eq!( + no_admin.into_wasm_msg(Addr::unchecked("ekez")), + WasmMsg::Instantiate { + admin: Some("ekez".to_string()), + code_id: 42, + msg: to_binary("foo").unwrap(), + funds: vec![], + label: "bar".to_string() + } + ) + } +} diff --git a/packages/dao-interface/src/voting.rs b/packages/dao-interface/src/voting.rs index 93308630f..f2df11a44 100644 --- a/packages/dao-interface/src/voting.rs +++ b/packages/dao-interface/src/voting.rs @@ -1,14 +1,34 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::Uint128; use cw2::ContractVersion; -use dao_macros::{active_query, token_query, voting_module_query}; -#[token_query] -#[voting_module_query] -#[active_query] #[cw_serde] #[derive(QueryResponses)] -pub enum Query {} +pub enum Query { + /// Returns the token contract address, if set. + #[returns(::cosmwasm_std::Addr)] + TokenContract {}, + /// Returns the voting power for an address at a given height. + #[returns(VotingPowerAtHeightResponse)] + VotingPowerAtHeight { + address: ::std::string::String, + height: ::std::option::Option<::std::primitive::u64>, + }, + /// Returns the total voting power at a given block heigh. + #[returns(TotalPowerAtHeightResponse)] + TotalPowerAtHeight { + height: ::std::option::Option<::std::primitive::u64>, + }, + /// Returns the address of the DAO this module belongs to. + #[returns(cosmwasm_std::Addr)] + Dao {}, + /// Returns contract version info. + #[returns(InfoResponse)] + Info {}, + /// Whether the DAO is active or not. + #[returns(::std::primitive::bool)] + IsActive {}, +} #[cw_serde] pub struct VotingPowerAtHeightResponse { @@ -31,32 +51,3 @@ pub struct InfoResponse { pub struct IsActiveResponse { pub active: bool, } - -mod tests { - - /// Make sure the enum has all of the fields we expect. This will - /// fail to compile if not. - #[test] - fn test_macro_expansion() { - use cosmwasm_schema::{cw_serde, QueryResponses}; - - use dao_macros::{active_query, token_query, voting_module_query}; - let query = Query::TokenContract {}; - - #[token_query] - #[voting_module_query] - #[active_query] - #[cw_serde] - #[derive(QueryResponses)] - enum Query {} - - match query { - Query::TokenContract {} => (), - Query::VotingPowerAtHeight { .. } => (), - Query::TotalPowerAtHeight { .. } => (), - Query::IsActive {} => (), - Query::Info {} => (), - Query::Dao {} => (), - } - } -} diff --git a/packages/dao-pre-propose-base/src/msg.rs b/packages/dao-pre-propose-base/src/msg.rs index 23aaeeac3..b2f2cc410 100644 --- a/packages/dao-pre-propose-base/src/msg.rs +++ b/packages/dao-pre-propose-base/src/msg.rs @@ -98,7 +98,7 @@ where /// associated with. Returns `Addr`. #[returns(cosmwasm_std::Addr)] ProposalModule {}, - /// Gets the DAO (cw-dao-core) module this contract is associated + /// Gets the DAO (dao-dao-core) module this contract is associated /// with. Returns `Addr`. #[returns(cosmwasm_std::Addr)] Dao {}, diff --git a/packages/dao-pre-propose-base/src/state.rs b/packages/dao-pre-propose-base/src/state.rs index 2c40d18ea..26310a5cb 100644 --- a/packages/dao-pre-propose-base/src/state.rs +++ b/packages/dao-pre-propose-base/src/state.rs @@ -21,7 +21,7 @@ pub struct Config { pub struct PreProposeContract { /// The proposal module that this module is associated with. pub proposal_module: Item<'static, Addr>, - /// The DAO (cw-dao-core module) that this module is associated + /// The DAO (dao-dao-core module) that this module is associated /// with. pub dao: Item<'static, Addr>, /// The configuration for this module. diff --git a/packages/dao-testing/Cargo.toml b/packages/dao-testing/Cargo.toml index 49793d160..b53e2d15e 100644 --- a/packages/dao-testing/Cargo.toml +++ b/packages/dao-testing/Cargo.toml @@ -14,7 +14,7 @@ version = { workspace = true } # conditionally. As such, we don't compile anything here if we're # targeting wasm. [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-schema = { version = "1.0.0" } +cosmwasm-schema = { workspace = true } cosmwasm-std = { workspace = true } cw-multi-test = { workspace = true } cw-utils = { workspace = true } @@ -31,7 +31,7 @@ cw-proposal-single-v1 = { workspace = true } cw-vesting = { workspace = true } cw20-stake = { workspace = true } cw721-base = { workspace = true } -dao-core = { workspace = true, features = ["library"] } +dao-dao-core = { workspace = true, features = ["library"] } dao-interface = { workspace = true } dao-pre-propose-multiple = { workspace = true } dao-pre-propose-single = { workspace = true } diff --git a/packages/dao-testing/src/contracts.rs b/packages/dao-testing/src/contracts.rs index c6df42b17..3f51f9a0a 100644 --- a/packages/dao-testing/src/contracts.rs +++ b/packages/dao-testing/src/contracts.rs @@ -117,14 +117,14 @@ pub fn voting_cw721_staked_contract() -> Box> { Box::new(contract) } -pub fn dao_core_contract() -> Box> { +pub fn dao_dao_contract() -> Box> { let contract = ContractWrapper::new( - dao_core::contract::execute, - dao_core::contract::instantiate, - dao_core::contract::query, + dao_dao_core::contract::execute, + dao_dao_core::contract::instantiate, + dao_dao_core::contract::query, ) - .with_reply(dao_core::contract::reply) - .with_migrate(dao_core::contract::migrate); + .with_reply(dao_dao_core::contract::reply) + .with_migrate(dao_dao_core::contract::migrate); Box::new(contract) } @@ -149,7 +149,7 @@ pub fn v1_proposal_single_contract() -> Box> { Box::new(contract) } -pub fn v1_dao_core_contract() -> Box> { +pub fn v1_dao_dao_contract() -> Box> { let contract = ContractWrapper::new( cw_core_v1::contract::execute, cw_core_v1::contract::instantiate, diff --git a/packages/dao-testing/src/helpers.rs b/packages/dao-testing/src/helpers.rs index 8984588a4..c9a24d0c5 100644 --- a/packages/dao-testing/src/helpers.rs +++ b/packages/dao-testing/src/helpers.rs @@ -2,7 +2,7 @@ use cosmwasm_std::{to_binary, Addr, Binary, Empty, Uint128}; use cw20::Cw20Coin; use cw_multi_test::{App, Contract, ContractWrapper, Executor}; use cw_utils::Duration; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use dao_voting_cw20_staked::msg::ActiveThreshold; const CREATOR_ADDR: &str = "creator"; @@ -40,7 +40,7 @@ pub fn instantiate_with_cw20_balances_governance( .collect() }; - let governance_instantiate = dao_core::msg::InstantiateMsg { + let governance_instantiate = dao_interface::msg::InstantiateMsg { dao_uri: None, admin: None, name: "DAO DAO".to_string(), @@ -119,7 +119,7 @@ pub fn instantiate_with_staked_balances_governance( let staked_balances_voting_id = app.store_code(staked_balances_voting()); let core_contract_id = app.store_code(cw_gov_contract()); - let instantiate_core = dao_core::msg::InstantiateMsg { + let instantiate_core = dao_interface::msg::InstantiateMsg { dao_uri: None, admin: None, name: "DAO DAO".to_string(), @@ -168,9 +168,12 @@ pub fn instantiate_with_staked_balances_governance( ) .unwrap(); - let gov_state: dao_core::query::DumpStateResponse = app + let gov_state: dao_interface::query::DumpStateResponse = app .wrap() - .query_wasm_smart(core_addr.clone(), &dao_core::msg::QueryMsg::DumpState {}) + .query_wasm_smart( + core_addr.clone(), + &dao_interface::msg::QueryMsg::DumpState {}, + ) .unwrap(); let voting_module = gov_state.voting_module; @@ -235,7 +238,7 @@ pub fn instantiate_with_staking_active_threshold( ] }); - let governance_instantiate = dao_core::msg::InstantiateMsg { + let governance_instantiate = dao_interface::msg::InstantiateMsg { dao_uri: None, admin: None, name: "DAO DAO".to_string(), @@ -316,7 +319,7 @@ pub fn instantiate_with_cw4_groups_governance( .collect() }; - let governance_instantiate = dao_core::msg::InstantiateMsg { + let governance_instantiate = dao_interface::msg::InstantiateMsg { dao_uri: None, admin: None, name: "DAO DAO".to_string(), @@ -400,11 +403,11 @@ fn cw20_staked_balances_voting() -> Box> { fn cw_gov_contract() -> Box> { let contract = ContractWrapper::new( - dao_core::contract::execute, - dao_core::contract::instantiate, - dao_core::contract::query, + dao_dao_core::contract::execute, + dao_dao_core::contract::instantiate, + dao_dao_core::contract::query, ) - .with_reply(dao_core::contract::reply); + .with_reply(dao_dao_core::contract::reply); Box::new(contract) } diff --git a/packages/dao-voting/Cargo.toml b/packages/dao-voting/Cargo.toml index 489578235..ced2f11db 100644 --- a/packages/dao-voting/Cargo.toml +++ b/packages/dao-voting/Cargo.toml @@ -13,8 +13,7 @@ cosmwasm-schema = { workspace = true } thiserror = { workspace = true } cw20 = { workspace = true } dao-interface = { workspace = true } -dao-macros = { workspace = true } -dao-core = { workspace = true } +dao-dao-macros = { workspace = true } cw-denom = { workspace = true } cw-utils = { workspace = true } cw-storage-plus = { workspace = true } diff --git a/packages/dao-voting/src/deposit.rs b/packages/dao-voting/src/deposit.rs index 606dbcc62..bf0852ea8 100644 --- a/packages/dao-voting/src/deposit.rs +++ b/packages/dao-voting/src/deposit.rs @@ -36,7 +36,7 @@ pub enum DepositToken { /// module. NOTE: in order to use the token address of the voting /// module the voting module must (1) use a cw20 token and (2) /// implement the `TokenContract {}` query type defined by - /// `dao_macros::token_query`. Failing to implement that + /// `dao_dao_macros::token_query`. Failing to implement that /// and using this option will cause instantiation to fail. VotingModuleToken {}, } @@ -101,7 +101,7 @@ impl UncheckedDepositInfo { DepositToken::VotingModuleToken {} => { let voting_module: Addr = deps .querier - .query_wasm_smart(dao, &dao_core::msg::QueryMsg::VotingModule {})?; + .query_wasm_smart(dao, &dao_interface::msg::QueryMsg::VotingModule {})?; // If the voting module has no token this will // error. This is desirable. let token_addr: Addr = deps.querier.query_wasm_smart( diff --git a/packages/dao-voting/src/pre_propose.rs b/packages/dao-voting/src/pre_propose.rs index 0ab4a8480..52bd3e7a5 100644 --- a/packages/dao-voting/src/pre_propose.rs +++ b/packages/dao-voting/src/pre_propose.rs @@ -3,7 +3,7 @@ use cosmwasm_schema::cw_serde; use cosmwasm_std::{Addr, Empty, StdResult, SubMsg}; -use dao_interface::ModuleInstantiateInfo; +use dao_interface::state::ModuleInstantiateInfo; use crate::reply::pre_propose_module_instantiation_id; diff --git a/packages/dao-voting/src/reply.rs b/packages/dao-voting/src/reply.rs index 9a663ab55..dbf916e2b 100644 --- a/packages/dao-voting/src/reply.rs +++ b/packages/dao-voting/src/reply.rs @@ -1,4 +1,4 @@ -use dao_macros::limit_variant_count; +use dao_dao_macros::limit_variant_count; const FAILED_PROPOSAL_EXECUTION_MASK: u64 = 0b000; const FAILED_PROPOSAL_HOOK_MASK: u64 = 0b001; diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100644 index 000000000..ba42f086e --- /dev/null +++ b/scripts/publish.sh @@ -0,0 +1,197 @@ +#!/usr/bin/env bash +set -o errexit -o nounset -o pipefail +command -v shellcheck >/dev/null && shellcheck "$0" + +function print_usage() { + echo "Usage: $0 [-h|--help]" + echo "Publishes crates to crates.io." +} + +if [ $# = 1 ] && { [ "$1" = "-h" ] || [ "$1" = "--help" ] ; } +then + print_usage + exit 1 +fi + +START_DIR=$(pwd) + +# Publishing cargo workspaces with cyclic dependencies is very tricky. +# Dev-dependencies are often cyclic, so we need to publish without them. +# There is ongoing discussion about this issue: https://github.com/rust-lang/cargo/issues/4242 +# +# In the meantime, we are using cargo-hack to publish our crates. +# This temporarily removes dev dependencies from Cargo.toml and publishes the crate. +# https://github.com/taiki-e/cargo-hack +# +# Install cargo-hack to run this script. `cargo install cargo-hack` + +# Crates must be published in the correct order, as some depend on others. +# We start with publish packages, aside from dao-testing which must be published last. + +# Packages +cd packages/cw-denom +cargo publish +cd "$START_DIR" + +cd packages/cw-hooks +cargo publish +cd "$START_DIR" + +cd packages/cw-wormhole +cargo publish +cd "$START_DIR" + +cd packages/cw-stake-tracker +cargo publish +cd "$START_DIR" + +cd packages/cw-paginate-storage +cargo publish +cd "$START_DIR" + +sleep 120 + +cd packages/cw721-controllers +cargo publish +cd "$START_DIR" + +cd packages/dao-interface +cargo publish +cd "$START_DIR" + +cd packages/dao-dao-macros +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd packages/dao-voting +cargo publish +cd "$START_DIR" + +cd packages/dao-vote-hooks +cargo publish +cd "$START_DIR" + +sleep 120 + +cd packages/dao-proposal-hooks +cargo publish +cd "$START_DIR" + +cd packages/dao-pre-propose-base +cargo publish +cd "$START_DIR" + +# Test contracts +cd test-contracts/dao-proposal-sudo +cargo publish +cd "$START_DIR" + +cd test-contracts/dao-voting-cw20-balance +cargo publish +cd "$START_DIR" + +cd test-contracts/dao-proposal-hook-counter +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +sleep 120 + +# Contracts +cd contracts/external/cw-token-swap +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/external/cw-vesting +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/external/cw-payroll-factory +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/pre-propose/dao-pre-propose-single +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +sleep 120 + +cd contracts/pre-propose/dao-pre-propose-multiple +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/pre-propose/dao-pre-propose-approval-single +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/pre-propose/dao-pre-propose-approver +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/proposal/dao-proposal-single +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/proposal/dao-proposal-multiple +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +sleep 120 + +cd contracts/proposal/dao-proposal-condorcet +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/staking/cw20-stake +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/staking/cw20-stake-external-rewards +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/staking/cw20-stake-reward-distributor +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/voting/dao-voting-cw4 +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +sleep 120 + +cd contracts/voting/dao-voting-cw20-staked +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/voting/dao-voting-cw721-staked +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/voting/dao-voting-native-staked +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/dao-dao-core +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd contracts/external/cw-admin-factory +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +sleep 120 + +# TODO re-enable when ready +# cd contracts/external/cw-fund-distributor +# cargo hack publish --no-dev-deps --allow-dirty +# cd "$START_DIR" + +cd contracts/external/dao-migrator +cargo hack publish --no-dev-deps --allow-dirty +cd "$START_DIR" + +cd packages/dao-testing +cargo publish +cd "$START_DIR" + +echo "Everything is published!" diff --git a/scripts/schema.sh b/scripts/schema.sh index f17bc53c7..08fa7373e 100755 --- a/scripts/schema.sh +++ b/scripts/schema.sh @@ -7,8 +7,8 @@ START_DIR=$(pwd) # } # -echo "generating schema for dao-core" -cd contracts/dao-core +echo "generating schema for dao-dao-core" +cd contracts/dao-dao-core cargo run --example schema > /dev/null rm -rf ./schema/raw cd "$START_DIR" diff --git a/test-contracts/dao-proposal-hook-counter/Cargo.toml b/test-contracts/dao-proposal-hook-counter/Cargo.toml index b658a72e7..5effd61ef 100644 --- a/test-contracts/dao-proposal-hook-counter/Cargo.toml +++ b/test-contracts/dao-proposal-hook-counter/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dao-proposal-hook-counter" authors = ["Callum Anderson "] +description = "A DAO DAO test contract for counting proposal hook calls." edition = { workspace = true } license = { workspace = true } repository = { workspace = true } @@ -32,6 +33,6 @@ cw20-base = { workspace = true } cw-utils = { workspace = true } dao-voting = { workspace = true } dao-interface = { workspace = true } -dao-core = { workspace = true } +dao-dao-core = { workspace = true } dao-proposal-single = { workspace = true } cw-multi-test = { workspace = true } diff --git a/test-contracts/dao-proposal-hook-counter/src/tests.rs b/test-contracts/dao-proposal-hook-counter/src/tests.rs index c7cefd8ed..cb3483a81 100644 --- a/test-contracts/dao-proposal-hook-counter/src/tests.rs +++ b/test-contracts/dao-proposal-hook-counter/src/tests.rs @@ -2,8 +2,8 @@ use cosmwasm_std::{to_binary, Addr, Empty, Uint128}; use cw20::Cw20Coin; use cw_hooks::HooksResponse; use cw_multi_test::{App, Contract, ContractWrapper, Executor}; -use dao_core::state::ProposalModule; -use dao_interface::{Admin, ModuleInstantiateInfo}; +use dao_interface::state::ProposalModule; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; use dao_voting::{ pre_propose::PreProposeInfo, @@ -48,11 +48,11 @@ fn cw20_balances_voting() -> Box> { fn cw_gov_contract() -> Box> { let contract = ContractWrapper::new( - dao_core::contract::execute, - dao_core::contract::instantiate, - dao_core::contract::query, + dao_dao_core::contract::execute, + dao_dao_core::contract::instantiate, + dao_dao_core::contract::query, ) - .with_reply(dao_core::contract::reply); + .with_reply(dao_dao_core::contract::reply); Box::new(contract) } @@ -65,7 +65,11 @@ fn counters_contract() -> Box> { Box::new(contract) } -fn instantiate_governance(app: &mut App, code_id: u64, msg: dao_core::msg::InstantiateMsg) -> Addr { +fn instantiate_governance( + app: &mut App, + code_id: u64, + msg: dao_interface::msg::InstantiateMsg, +) -> Addr { app.instantiate_contract( code_id, Addr::unchecked(CREATOR_ADDR), @@ -94,7 +98,7 @@ fn instantiate_with_default_governance( }] }); - let governance_instantiate = dao_core::msg::InstantiateMsg { + let governance_instantiate = dao_interface::msg::InstantiateMsg { dao_uri: None, admin: None, name: "DAO DAO".to_string(), @@ -157,7 +161,7 @@ fn test_counters() { .wrap() .query_wasm_smart( governance_addr, - &dao_core::msg::QueryMsg::ProposalModules { + &dao_interface::msg::QueryMsg::ProposalModules { start_after: None, limit: None, }, diff --git a/test-contracts/dao-proposal-sudo/Cargo.toml b/test-contracts/dao-proposal-sudo/Cargo.toml index 2aa89d69b..9120fdf8b 100644 --- a/test-contracts/dao-proposal-sudo/Cargo.toml +++ b/test-contracts/dao-proposal-sudo/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dao-proposal-sudo" authors = ["ekez "] +description = "A proposal module that allows direct execution without voting." edition = { workspace = true } license = { workspace = true } repository = { workspace = true } @@ -22,7 +23,7 @@ cosmwasm-storage = { workspace = true } cw-storage-plus = { workspace = true } cw2 = { workspace = true } thiserror = { workspace = true } -dao-macros = { workspace = true } +dao-dao-macros = { workspace = true } dao-interface = { workspace = true } [dev-dependencies] diff --git a/test-contracts/dao-proposal-sudo/README b/test-contracts/dao-proposal-sudo/README index 3e53fef46..43cfd552d 100644 --- a/test-contracts/dao-proposal-sudo/README +++ b/test-contracts/dao-proposal-sudo/README @@ -1,5 +1,5 @@ -# cw20-govmod-sudo +# dao-proposal-sudo A governance module for the cw-governance contract. Instantiated with a root address. The root address may indiscriminately cause the module -to execute messages on the DAO. No other user may do this. \ No newline at end of file +to execute messages on the DAO. No other user may do this. diff --git a/test-contracts/dao-proposal-sudo/src/contract.rs b/test-contracts/dao-proposal-sudo/src/contract.rs index ea5c1a4d4..82df228e3 100644 --- a/test-contracts/dao-proposal-sudo/src/contract.rs +++ b/test-contracts/dao-proposal-sudo/src/contract.rs @@ -59,7 +59,7 @@ pub fn execute_execute( let msg = WasmMsg::Execute { contract_addr: dao.to_string(), - msg: to_binary(&dao_interface::ExecuteMsg::ExecuteProposalHook { msgs })?, + msg: to_binary(&dao_interface::msg::ExecuteMsg::ExecuteProposalHook { msgs })?, funds: vec![], }; diff --git a/test-contracts/dao-voting-cw20-balance/Cargo.toml b/test-contracts/dao-voting-cw20-balance/Cargo.toml index 6676c04b6..f126b6840 100644 --- a/test-contracts/dao-voting-cw20-balance/Cargo.toml +++ b/test-contracts/dao-voting-cw20-balance/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dao-voting-cw20-balance" authors = ["ekez "] +description = "A DAO DAO test contract." edition = { workspace = true } license = { workspace = true } repository = { workspace = true } @@ -23,7 +24,7 @@ cw2 = { workspace = true } cw20 = { workspace = true } cw-utils = { workspace = true } thiserror = { workspace = true } -dao-macros = { workspace = true } +dao-dao-macros = { workspace = true } dao-interface = { workspace = true } cw20-base = { workspace = true, features = ["library"] } diff --git a/test-contracts/dao-voting-cw20-balance/src/msg.rs b/test-contracts/dao-voting-cw20-balance/src/msg.rs index c7d531320..6a0a5cae3 100644 --- a/test-contracts/dao-voting-cw20-balance/src/msg.rs +++ b/test-contracts/dao-voting-cw20-balance/src/msg.rs @@ -3,7 +3,7 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; use cw20::Cw20Coin; use cw20_base::msg::InstantiateMarketingInfo; -use dao_macros::{token_query, voting_module_query}; +use dao_dao_macros::{token_query, voting_module_query}; #[cw_serde] pub enum TokenInfo {