Repository: DA0-DA0/dao-contracts
Pull request #320 (2022-06-06 19:53:49)

Rename stake-cw20
Renames it to be inline with other cosmwasm standards and for us to be consistent. First part of concluding on contract names and standards


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index 2544ea73..bf837cfd 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -253,7 +253,7 @@ dependencies = [
 [[package]]
 name = "cw-multi-test"
 version = "0.13.4"
-source = "git+https://github.com/CosmWasm/cw-plus?branch=main#44852805788d9c76e3b1faa7a039d5a77c49007b"
+source = "git+https://github.com/CosmWasm/cw-plus?branch=main#07d1f718a40bb33574f4ac40141aa6a948bc8c24"
 dependencies = [
  "anyhow",
  "cosmwasm-std",
@@ -329,6 +329,7 @@ dependencies = [
  "cw20",
  "cw20-balance-voting",
  "cw20-base",
+ "cw20-stake",
  "cw20-staked-balance-voting",
  "cw3",
  "cw4",
@@ -338,7 +339,6 @@ dependencies = [
  "proposal-hooks",
  "schemars",
  "serde",
- "stake-cw20",
  "testing",
  "thiserror",
  "vote-hooks",
@@ -376,7 +376,7 @@ dependencies = [
 [[package]]
 name = "cw-storage-plus"
 version = "0.13.4"
-source = "git+https://github.com/CosmWasm/cw-plus?branch=main#44852805788d9c76e3b1faa7a039d5a77c49007b"
+source = "git+https://github.com/CosmWasm/cw-plus?branch=main#07d1f718a40bb33574f4ac40141aa6a948bc8c24"
 dependencies = [
  "cosmwasm-std",
  "schemars",
@@ -398,7 +398,7 @@ dependencies = [
 [[package]]
 name = "cw-utils"
 version = "0.13.4"
-source = "git+https://github.com/CosmWasm/cw-plus?branch=main#44852805788d9c76e3b1faa7a039d5a77c49007b"
+source = "git+https://github.com/CosmWasm/cw-plus?branch=main#07d1f718a40bb33574f4ac40141aa6a948bc8c24"
 dependencies = [
  "cosmwasm-std",
  "schemars",
@@ -466,6 +466,26 @@ dependencies = [
  "thiserror",
 ]
 
+[[package]]
+name = "cw20-stake"
+version = "0.2.6"
+dependencies = [
+ "anyhow",
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cosmwasm-storage",
+ "cw-controllers",
+ "cw-multi-test 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cw-storage-plus 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cw-utils 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cw2",
+ "cw20",
+ "cw20-base",
+ "schemars",
+ "serde",
+ "thiserror",
+]
+
 [[package]]
 name = "cw20-staked-balance-voting"
 version = "0.1.0"
@@ -481,9 +501,9 @@ dependencies = [
  "cw2",
  "cw20",
  "cw20-base",
+ "cw20-stake",
  "schemars",
  "serde",
- "stake-cw20",
  "thiserror",
 ]
 
@@ -701,13 +721,13 @@ dependencies = [
 
 [[package]]
 name = "getrandom"
-version = "0.2.6"
+version = "0.2.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
+checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"
 dependencies = [
  "cfg-if",
  "libc",
- "wasi 0.10.2+wasi-snapshot-preview1",
+ "wasi 0.11.0+wasi-snapshot-preview1",
 ]
 
 [[package]]
@@ -917,7 +937,7 @@ version = "0.6.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
 dependencies = [
- "getrandom 0.2.6",
+ "getrandom 0.2.7",
 ]
 
 [[package]]
@@ -1058,26 +1078,6 @@ dependencies = [
  "der",
 ]
 
-[[package]]
-name = "stake-cw20"
-version = "0.2.6"
-dependencies = [
- "anyhow",
- "cosmwasm-schema",
- "cosmwasm-std",
- "cosmwasm-storage",
- "cw-controllers",
- "cw-multi-test 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "cw-storage-plus 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "cw-utils 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "cw2",
- "cw20",
- "cw20-base",
- "schemars",
- "serde",
- "thiserror",
-]
-
 [[package]]
 name = "stake-cw20-external-rewards"
 version = "0.2.6"
@@ -1093,9 +1093,9 @@ dependencies = [
  "cw2",
  "cw20",
  "cw20-base",
+ "cw20-stake",
  "schemars",
  "serde",
- "stake-cw20",
  "thiserror",
 ]
 
@@ -1112,9 +1112,9 @@ dependencies = [
  "cw2",
  "cw20",
  "cw20-base",
+ "cw20-stake",
  "schemars",
  "serde",
- "stake-cw20",
  "thiserror",
 ]
 
@@ -1191,9 +1191,9 @@ dependencies = [
 
 [[package]]
 name = "unicode-ident"
-version = "1.0.0"
+version = "1.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee"
+checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c"
 
 [[package]]
 name = "version_check"
@@ -1229,9 +1229,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
 
 [[package]]
 name = "wasi"
-version = "0.10.2+wasi-snapshot-preview1"
+version = "0.11.0+wasi-snapshot-preview1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
 
 [[package]]
 name = "zeroize"
diff --git a/README.md b/README.md
index 26d5f8af..67da4bf0 100644
--- a/README.md
+++ b/README.md
@@ -1,23 +1,23 @@
 # DAO DAO Contracts
 [![codecov](https://codecov.io/gh/DA0-DA0/dao-contracts/branch/main/graph/badge.svg?token=SCKOIPYZPV)](https://codecov.io/gh/DA0-DA0/dao-contracts)
 
-| Audited contracts                                                  | Description                                            |
-| :----------------------------------------------------------------- | :----------------------------------------------------- |
-| [cw-core](contracts/cw-core)                                       | The core module for a DAO DAO DAO.                     |
-| [cw-proposal-single](contracts/cw-proposal-single)                 | A proposal module for single choice (yes / no) voting. |
-| [cw20-staked-balance-voting](contracts/cw20-staked-balance-voting) | A voting power module for staked governance tokens.    |
-| [cw4-voting](contracts/cw4-voting)                                 | A voting power module for multisig-style voting.       |
-| [stake-cw20](contracts/stake-cw20)                                 | A contract for staking cw20 tokens.                    |
-
-
-| Unaudited contracts                                                    | Description                                              |
-| :--------------------------------------------------------------------- | :------------------------------------------------------- |
-| [cw-named-groups](contracts/cw-named-groups)                           | A contract for managing named groups of addresses.       |
-| [cw-proposal-sudo](contracts/cw-proposal-sudo)                         | A proposal module that allows an admin to control a DAO. |
-| [cw20-balance-voting](contracts/cw20-balance-voting)                   | TESTING ONLY - a voting module based on cw20 balances.   |
-| [proposal-hooks-counter](contracts/proposal-hooks-counter)             | TESTING ONLY - a contract for testing proposal hooks.    |
-| [stake-external-rewards](contracts/stake-cw20-external-rewards)        | A contract for providing external stakinig rewards.      |
-| [stake-cw20-reward-distributor](contracts/stake-cw20-external-rewards) | A contract for distributing rewards via stake-cw20.      |
+| Audited contracts                                                        | Description                                                |
+| :----------------------------------------------------------------------- | :--------------------------------------------------------- |
+| [cw-core](contracts/cw-core)                                             | The core module for a DAO DAO DAO.                         |
+| [cw-proposal-single](contracts/cw-proposal-single)                       | A proposal module for single choice (yes / no) voting.     |
+| [cw20-staked-balance-voting](contracts/cw20-staked-balance-voting)       | A voting power module for staked governance tokens.        |
+| [cw4-voting](contracts/cw4-voting)                                       | A voting power module for multisig-style voting.           |
+| [cw20-stake](contracts/cw20-stake)                                       | A contract for staking cw20 tokens.                        |
+
+
+| Unaudited contracts                                                      | Description                                                |
+| :----------------------------------------------------------------------- | :--------------------------------------------------------- |
+| [cw-named-groups](contracts/cw-named-groups)                             | A contract for managing named groups of addresses.         |
+| [cw-proposal-sudo](contracts/cw-proposal-sudo)                           | A proposal module that allows an admin to control a DAO.   |
+| [cw20-balance-voting](contracts/cw20-balance-voting)                     | TESTING ONLY - a voting module based on cw20 balances.     |
+| [proposal-hooks-counter](contracts/proposal-hooks-counter)               | TESTING ONLY - a contract for testing proposal hooks.      |
+| [stake-external-rewards](contracts/cw20-stake-external-rewards)          | A contract for providing external stakinig rewards.        |
+| [cw20-stake-reward-distributor](contracts/cw20-stake-external-rewards)   | A contract for distributing rewards via stake-cw20.        |
 
 Audited contracts have completed [an
 audit](https://github.com/securityDAO/audits/blob/7bb8e4910baaea89fddfc025591658f44adbc27c/cosmwasm/dao-contracts/v0.3%20DAO%20DAO%20audit.pdf)
diff --git a/contracts/cw-proposal-single/Cargo.toml b/contracts/cw-proposal-single/Cargo.toml
index 1b5d0b51..a43d4584 100644
--- a/contracts/cw-proposal-single/Cargo.toml
+++ b/contracts/cw-proposal-single/Cargo.toml
@@ -54,7 +54,7 @@ cw4-voting = { path = "../cw4-voting", version = "*" }
 cw20-balance-voting = { path = "../../debug/cw20-balance-voting", version = "*" }
 cw20-staked-balance-voting = { path = "../cw20-staked-balance-voting", version = "*" }
 testing = { version = "*", path = "../../packages/testing" }
-stake-cw20 = { path="../stake-cw20", version = "*" }
+cw20-stake = { path= "../cw20-stake", version = "*" }
 cw20-base = "0.13"
 cw4 = "0.13"
 cw4-group = "0.13"
diff --git a/contracts/stake-cw20-external-rewards/.cargo/config b/contracts/cw20-stake-external-rewards/.cargo/config
similarity index 100%
rename from contracts/stake-cw20-external-rewards/.cargo/config
rename to contracts/cw20-stake-external-rewards/.cargo/config
diff --git a/contracts/stake-cw20-external-rewards/Cargo.lock b/contracts/cw20-stake-external-rewards/Cargo.lock
similarity index 100%
rename from contracts/stake-cw20-external-rewards/Cargo.lock
rename to contracts/cw20-stake-external-rewards/Cargo.lock
diff --git a/contracts/stake-cw20-external-rewards/Cargo.toml b/contracts/cw20-stake-external-rewards/Cargo.toml
similarity index 94%
rename from contracts/stake-cw20-external-rewards/Cargo.toml
rename to contracts/cw20-stake-external-rewards/Cargo.toml
index 2fd233fb..109a0db4 100644
--- a/contracts/stake-cw20-external-rewards/Cargo.toml
+++ b/contracts/cw20-stake-external-rewards/Cargo.toml
@@ -27,7 +27,7 @@ cw2 = "0.13"
 schemars = "0.8.8"
 serde = { version = "1.0.132", default-features = false, features = ["derive"] }
 thiserror = { version = "1.0.30" }
-stake-cw20 = { path = "../stake-cw20", features = ["library"]}
+cw20-stake = { path = "../cw20-stake", features = ["library"]}
 
 [dev-dependencies]
 cosmwasm-schema = { version = "1.0.0" }
diff --git a/contracts/stake-cw20-external-rewards/LICENSE b/contracts/cw20-stake-external-rewards/LICENSE
similarity index 100%
rename from contracts/stake-cw20-external-rewards/LICENSE
rename to contracts/cw20-stake-external-rewards/LICENSE
diff --git a/contracts/stake-cw20-external-rewards/NOTICE b/contracts/cw20-stake-external-rewards/NOTICE
similarity index 100%
rename from contracts/stake-cw20-external-rewards/NOTICE
rename to contracts/cw20-stake-external-rewards/NOTICE
diff --git a/contracts/stake-cw20-external-rewards/README.md b/contracts/cw20-stake-external-rewards/README.md
similarity index 100%
rename from contracts/stake-cw20-external-rewards/README.md
rename to contracts/cw20-stake-external-rewards/README.md
diff --git a/contracts/stake-cw20-external-rewards/examples/schema.rs b/contracts/cw20-stake-external-rewards/examples/schema.rs
similarity index 100%
rename from contracts/stake-cw20-external-rewards/examples/schema.rs
rename to contracts/cw20-stake-external-rewards/examples/schema.rs
diff --git a/contracts/stake-cw20-external-rewards/schema/execute_msg.json b/contracts/cw20-stake-external-rewards/schema/execute_msg.json
similarity index 100%
rename from contracts/stake-cw20-external-rewards/schema/execute_msg.json
rename to contracts/cw20-stake-external-rewards/schema/execute_msg.json
diff --git a/contracts/stake-cw20-external-rewards/schema/info_response.json b/contracts/cw20-stake-external-rewards/schema/info_response.json
similarity index 100%
rename from contracts/stake-cw20-external-rewards/schema/info_response.json
rename to contracts/cw20-stake-external-rewards/schema/info_response.json
diff --git a/contracts/stake-cw20-external-rewards/schema/instantiate_msg.json b/contracts/cw20-stake-external-rewards/schema/instantiate_msg.json
similarity index 100%
rename from contracts/stake-cw20-external-rewards/schema/instantiate_msg.json
rename to contracts/cw20-stake-external-rewards/schema/instantiate_msg.json
diff --git a/contracts/stake-cw20-external-rewards/schema/pending_rewards_response.json b/contracts/cw20-stake-external-rewards/schema/pending_rewards_response.json
similarity index 100%
rename from contracts/stake-cw20-external-rewards/schema/pending_rewards_response.json
rename to contracts/cw20-stake-external-rewards/schema/pending_rewards_response.json
diff --git a/contracts/stake-cw20-external-rewards/schema/query_msg.json b/contracts/cw20-stake-external-rewards/schema/query_msg.json
similarity index 100%
rename from contracts/stake-cw20-external-rewards/schema/query_msg.json
rename to contracts/cw20-stake-external-rewards/schema/query_msg.json
diff --git a/contracts/stake-cw20-external-rewards/src/contract.rs b/contracts/cw20-stake-external-rewards/src/contract.rs
similarity index 98%
rename from contracts/stake-cw20-external-rewards/src/contract.rs
rename to contracts/cw20-stake-external-rewards/src/contract.rs
index 7d92bb7c..b6d02f16 100644
--- a/contracts/stake-cw20-external-rewards/src/contract.rs
+++ b/contracts/cw20-stake-external-rewards/src/contract.rs
@@ -19,13 +19,13 @@ use cosmwasm_std::{
 };
 use cw2::set_contract_version;
 use cw20::{Cw20ReceiveMsg, Denom};
-use stake_cw20::hooks::StakeChangedHookMsg;
+use cw20_stake::hooks::StakeChangedHookMsg;
 
 use cw20::Denom::Cw20;
 use std::cmp::min;
 use std::convert::TryInto;
 
-const CONTRACT_NAME: &str = "crates.io:stake-cw20-external-rewards";
+const CONTRACT_NAME: &str = "crates.io:cw20-stake-external-rewards";
 const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");
 
 #[cfg_attr(not(feature = "library"), entry_point)]
@@ -49,9 +49,9 @@ pub fn instantiate(
     };
 
     // Verify contract provided is a staking contract
-    let _: stake_cw20::msg::TotalStakedAtHeightResponse = deps.querier.query_wasm_smart(
+    let _: cw20_stake::msg::TotalStakedAtHeightResponse = deps.querier.query_wasm_smart(
         &msg.staking_contract,
-        &stake_cw20::msg::QueryMsg::TotalStakedAtHeight { height: None },
+        &cw20_stake::msg::QueryMsg::TotalStakedAtHeight { height: None },
     )?;
 
     let config = Config {
@@ -343,18 +343,18 @@ fn get_last_time_reward_applicable(deps: Deps, env: &Env) -> StdResult<u64> {
 }
 
 fn get_total_staked(deps: Deps, contract_addr: &Addr) -> StdResult<Uint128> {
-    let msg = stake_cw20::msg::QueryMsg::TotalStakedAtHeight { height: None };
-    let resp: stake_cw20::msg::TotalStakedAtHeightResponse =
+    let msg = cw20_stake::msg::QueryMsg::TotalStakedAtHeight { height: None };
+    let resp: cw20_stake::msg::TotalStakedAtHeightResponse =
         deps.querier.query_wasm_smart(contract_addr, &msg)?;
     Ok(resp.total)
 }
 
 fn get_staked_balance(deps: Deps, contract_addr: &Addr, addr: &Addr) -> StdResult<Uint128> {
-    let msg = stake_cw20::msg::QueryMsg::StakedBalanceAtHeight {
+    let msg = cw20_stake::msg::QueryMsg::StakedBalanceAtHeight {
         address: addr.into(),
         height: None,
     };
-    let resp: stake_cw20::msg::StakedBalanceAtHeightResponse =
+    let resp: cw20_stake::msg::StakedBalanceAtHeightResponse =
         deps.querier.query_wasm_smart(contract_addr, &msg)?;
     Ok(resp.balance)
 }
@@ -527,9 +527,9 @@ mod tests {
 
     pub fn contract_staking() -> Box<dyn Contract<Empty>> {
         let contract = ContractWrapper::new(
-            stake_cw20::contract::execute,
-            stake_cw20::contract::instantiate,
-            stake_cw20::contract::query,
+            cw20_stake::contract::execute,
+            cw20_stake::contract::instantiate,
+            cw20_stake::contract::query,
         );
         Box::new(contract)
     }
@@ -568,7 +568,7 @@ mod tests {
         unstaking_duration: Option<Duration>,
     ) -> Addr {
         let staking_code_id = app.store_code(contract_staking());
-        let msg = stake_cw20::msg::InstantiateMsg {
+        let msg = cw20_stake::msg::InstantiateMsg {
             owner: Some(OWNER.to_string()),
             manager: Some("manager".to_string()),
             token_address: cw20.to_string(),
@@ -595,14 +595,14 @@ mod tests {
         let msg = cw20::Cw20ExecuteMsg::Send {
             contract: staking_addr.to_string(),
             amount: Uint128::new(amount),
-            msg: to_binary(&stake_cw20::msg::ReceiveMsg::Stake {}).unwrap(),
+            msg: to_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(),
         };
         app.execute_contract(Addr::unchecked(sender), cw20_addr.clone(), &msg, &[])
             .unwrap();
     }
 
     fn unstake_tokens(app: &mut App, staking_addr: &Addr, address: &str, amount: u128) {
-        let msg = stake_cw20::msg::ExecuteMsg::Unstake {
+        let msg = cw20_stake::msg::ExecuteMsg::Unstake {
             amount: Uint128::new(amount),
         };
         app.execute_contract(Addr::unchecked(address), staking_addr.clone(), &msg, &[])
@@ -646,7 +646,7 @@ mod tests {
         let reward_addr = app
             .instantiate_contract(reward_code_id, owner, &msg, &[], "reward", None)
             .unwrap();
-        let msg = stake_cw20::msg::ExecuteMsg::AddHook {
+        let msg = cw20_stake::msg::ExecuteMsg::AddHook {
             addr: reward_addr.to_string(),
         };
         let _result = app
diff --git a/contracts/stake-cw20-external-rewards/src/error.rs b/contracts/cw20-stake-external-rewards/src/error.rs
similarity index 100%
rename from contracts/stake-cw20-external-rewards/src/error.rs
rename to contracts/cw20-stake-external-rewards/src/error.rs
diff --git a/contracts/stake-cw20-external-rewards/src/lib.rs b/contracts/cw20-stake-external-rewards/src/lib.rs
similarity index 100%
rename from contracts/stake-cw20-external-rewards/src/lib.rs
rename to contracts/cw20-stake-external-rewards/src/lib.rs
diff --git a/contracts/stake-cw20-external-rewards/src/msg.rs b/contracts/cw20-stake-external-rewards/src/msg.rs
similarity index 97%
rename from contracts/stake-cw20-external-rewards/src/msg.rs
rename to contracts/cw20-stake-external-rewards/src/msg.rs
index 8d7df9ba..fa1f94c0 100644
--- a/contracts/stake-cw20-external-rewards/src/msg.rs
+++ b/contracts/cw20-stake-external-rewards/src/msg.rs
@@ -1,8 +1,8 @@
 use cosmwasm_std::Uint128;
 use cw20::{Cw20ReceiveMsg, Denom};
+use cw20_stake::hooks::StakeChangedHookMsg;
 use schemars::JsonSchema;
 use serde::{Deserialize, Serialize};
-use stake_cw20::hooks::StakeChangedHookMsg;
 
 use crate::state::{Config, RewardConfig};
 pub use cw_controllers::ClaimsResponse;
diff --git a/contracts/stake-cw20-external-rewards/src/state.rs b/contracts/cw20-stake-external-rewards/src/state.rs
similarity index 100%
rename from contracts/stake-cw20-external-rewards/src/state.rs
rename to contracts/cw20-stake-external-rewards/src/state.rs
diff --git a/contracts/stake-cw20-reward-distributor/.cargo/config b/contracts/cw20-stake-reward-distributor/.cargo/config
similarity index 100%
rename from contracts/stake-cw20-reward-distributor/.cargo/config
rename to contracts/cw20-stake-reward-distributor/.cargo/config
diff --git a/contracts/stake-cw20-reward-distributor/Cargo.toml b/contracts/cw20-stake-reward-distributor/Cargo.toml
similarity index 95%
rename from contracts/stake-cw20-reward-distributor/Cargo.toml
rename to contracts/cw20-stake-reward-distributor/Cargo.toml
index 4556d179..a012240a 100644
--- a/contracts/stake-cw20-reward-distributor/Cargo.toml
+++ b/contracts/cw20-stake-reward-distributor/Cargo.toml
@@ -37,7 +37,7 @@ cw20 = { version = "0.13" }
 cw-utils = "0.13"
 schemars = "0.8"
 cw20-base = {  version = "0.13", features = ["library"] }
-stake-cw20 = { path = "../stake-cw20", features = ["library"]}
+cw20-stake = { path = "../cw20-stake", features = ["library"]}
 serde = { version = "1.0", default-features = false, features = ["derive"] }
 thiserror = { version = "1.0" }
 
diff --git a/contracts/stake-cw20-reward-distributor/README.md b/contracts/cw20-stake-reward-distributor/README.md
similarity index 100%
rename from contracts/stake-cw20-reward-distributor/README.md
rename to contracts/cw20-stake-reward-distributor/README.md
diff --git a/contracts/stake-cw20-reward-distributor/examples/schema.rs b/contracts/cw20-stake-reward-distributor/examples/schema.rs
similarity index 100%
rename from contracts/stake-cw20-reward-distributor/examples/schema.rs
rename to contracts/cw20-stake-reward-distributor/examples/schema.rs
diff --git a/contracts/stake-cw20-reward-distributor/schema/execute_msg.json b/contracts/cw20-stake-reward-distributor/schema/execute_msg.json
similarity index 100%
rename from contracts/stake-cw20-reward-distributor/schema/execute_msg.json
rename to contracts/cw20-stake-reward-distributor/schema/execute_msg.json
diff --git a/contracts/stake-cw20-reward-distributor/schema/instantiate_msg.json b/contracts/cw20-stake-reward-distributor/schema/instantiate_msg.json
similarity index 100%
rename from contracts/stake-cw20-reward-distributor/schema/instantiate_msg.json
rename to contracts/cw20-stake-reward-distributor/schema/instantiate_msg.json
diff --git a/contracts/stake-cw20-reward-distributor/schema/query_msg.json b/contracts/cw20-stake-reward-distributor/schema/query_msg.json
similarity index 100%
rename from contracts/stake-cw20-reward-distributor/schema/query_msg.json
rename to contracts/cw20-stake-reward-distributor/schema/query_msg.json
diff --git a/contracts/stake-cw20-reward-distributor/src/contract.rs b/contracts/cw20-stake-reward-distributor/src/contract.rs
similarity index 96%
rename from contracts/stake-cw20-reward-distributor/src/contract.rs
rename to contracts/cw20-stake-reward-distributor/src/contract.rs
index d5f3c50c..76d145a4 100644
--- a/contracts/stake-cw20-reward-distributor/src/contract.rs
+++ b/contracts/cw20-stake-reward-distributor/src/contract.rs
@@ -10,7 +10,7 @@ use crate::state::{Config, CONFIG, LAST_PAYMENT_BLOCK};
 use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult};
 use cw2::set_contract_version;
 
-const CONTRACT_NAME: &str = "crates.io:stake-cw20-reward-distributor";
+const CONTRACT_NAME: &str = "crates.io:cw20-stake-reward-distributor";
 const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");
 
 #[cfg_attr(not(feature = "library"), entry_point)]
@@ -137,10 +137,10 @@ pub fn validate_cw20(deps: Deps, cw20_addr: Addr) -> bool {
 }
 
 pub fn validate_staking(deps: Deps, staking_addr: Addr) -> bool {
-    let response: Result<stake_cw20::msg::TotalStakedAtHeightResponse, StdError> =
+    let response: Result<cw20_stake::msg::TotalStakedAtHeightResponse, StdError> =
         deps.querier.query_wasm_smart(
             staking_addr,
-            &stake_cw20::msg::QueryMsg::TotalStakedAtHeight { height: None },
+            &cw20_stake::msg::QueryMsg::TotalStakedAtHeight { height: None },
         );
     response.is_ok()
 }
@@ -171,7 +171,7 @@ fn get_distribution_msg(deps: Deps, env: &Env) -> Result<CosmosMsg, ContractErro
     let msg = to_binary(&cw20::Cw20ExecuteMsg::Send {
         contract: config.staking_addr.clone().into_string(),
         amount,
-        msg: to_binary(&stake_cw20::msg::ReceiveMsg::Fund {}).unwrap(),
+        msg: to_binary(&cw20_stake::msg::ReceiveMsg::Fund {}).unwrap(),
     })?;
     let send_msg: CosmosMsg = WasmMsg::Execute {
         contract_addr: config.reward_token.into(),
diff --git a/contracts/stake-cw20/.cargo/config b/contracts/cw20-stake/.cargo/config
similarity index 100%
rename from contracts/stake-cw20/.cargo/config
rename to contracts/cw20-stake/.cargo/config
diff --git a/contracts/stake-cw20/Cargo.lock b/contracts/cw20-stake/Cargo.lock
similarity index 100%
rename from contracts/stake-cw20/Cargo.lock
rename to contracts/cw20-stake/Cargo.lock
diff --git a/contracts/stake-cw20/Cargo.toml b/contracts/cw20-stake/Cargo.toml
similarity index 98%
rename from contracts/stake-cw20/Cargo.toml
rename to contracts/cw20-stake/Cargo.toml
index 67a0ebf3..54e3311c 100644
--- a/contracts/stake-cw20/Cargo.toml
+++ b/contracts/cw20-stake/Cargo.toml
@@ -1,5 +1,5 @@
 [package]
-name = "stake-cw20"
+name = "cw20-stake"
 version = "0.2.6"
 authors = ["Ben2x4 <Ben2x4@tutanota.com>"]
 edition = "2018"
diff --git a/contracts/stake-cw20/LICENSE b/contracts/cw20-stake/LICENSE
similarity index 100%
rename from contracts/stake-cw20/LICENSE
rename to contracts/cw20-stake/LICENSE
diff --git a/contracts/stake-cw20/NOTICE b/contracts/cw20-stake/NOTICE
similarity index 100%
rename from contracts/stake-cw20/NOTICE
rename to contracts/cw20-stake/NOTICE
diff --git a/contracts/stake-cw20/README.md b/contracts/cw20-stake/README.md
similarity index 100%
rename from contracts/stake-cw20/README.md
rename to contracts/cw20-stake/README.md
diff --git a/contracts/stake-cw20/examples/schema.rs b/contracts/cw20-stake/examples/schema.rs
similarity index 98%
rename from contracts/stake-cw20/examples/schema.rs
rename to contracts/cw20-stake/examples/schema.rs
index bf77c2c8..354bc936 100644
--- a/contracts/stake-cw20/examples/schema.rs
+++ b/contracts/cw20-stake/examples/schema.rs
@@ -7,7 +7,7 @@ use cw20::{
     AllAccountsResponse, AllAllowancesResponse, AllowanceResponse, BalanceResponse,
     TokenInfoResponse,
 };
-use stake_cw20::msg::{
+use cw20_stake::msg::{
     ClaimsResponse, ExecuteMsg, GetConfigResponse, GetHooksResponse, InstantiateMsg, QueryMsg,
     StakedBalanceAtHeightResponse, StakedValueResponse, TotalStakedAtHeightResponse,
     TotalValueResponse,
diff --git a/contracts/stake-cw20/schema/all_accounts_response.json b/contracts/cw20-stake/schema/all_accounts_response.json
similarity index 100%
rename from contracts/stake-cw20/schema/all_accounts_response.json
rename to contracts/cw20-stake/schema/all_accounts_response.json
diff --git a/contracts/stake-cw20/schema/all_allowances_response.json b/contracts/cw20-stake/schema/all_allowances_response.json
similarity index 100%
rename from contracts/stake-cw20/schema/all_allowances_response.json
rename to contracts/cw20-stake/schema/all_allowances_response.json
diff --git a/contracts/stake-cw20/schema/allowance_response.json b/contracts/cw20-stake/schema/allowance_response.json
similarity index 100%
rename from contracts/stake-cw20/schema/allowance_response.json
rename to contracts/cw20-stake/schema/allowance_response.json
diff --git a/contracts/stake-cw20/schema/balance_response.json b/contracts/cw20-stake/schema/balance_response.json
similarity index 100%
rename from contracts/stake-cw20/schema/balance_response.json
rename to contracts/cw20-stake/schema/balance_response.json
diff --git a/contracts/stake-cw20/schema/claims_response.json b/contracts/cw20-stake/schema/claims_response.json
similarity index 100%
rename from contracts/stake-cw20/schema/claims_response.json
rename to contracts/cw20-stake/schema/claims_response.json
diff --git a/contracts/stake-cw20/schema/execute_msg.json b/contracts/cw20-stake/schema/execute_msg.json
similarity index 100%
rename from contracts/stake-cw20/schema/execute_msg.json
rename to contracts/cw20-stake/schema/execute_msg.json
diff --git a/contracts/stake-cw20/schema/get_config_response.json b/contracts/cw20-stake/schema/get_config_response.json
similarity index 100%
rename from contracts/stake-cw20/schema/get_config_response.json
rename to contracts/cw20-stake/schema/get_config_response.json
diff --git a/contracts/stake-cw20/schema/get_hooks_response.json b/contracts/cw20-stake/schema/get_hooks_response.json
similarity index 100%
rename from contracts/stake-cw20/schema/get_hooks_response.json
rename to contracts/cw20-stake/schema/get_hooks_response.json
diff --git a/contracts/stake-cw20/schema/instantiate_msg.json b/contracts/cw20-stake/schema/instantiate_msg.json
similarity index 100%
rename from contracts/stake-cw20/schema/instantiate_msg.json
rename to contracts/cw20-stake/schema/instantiate_msg.json
diff --git a/contracts/stake-cw20/schema/query_msg.json b/contracts/cw20-stake/schema/query_msg.json
similarity index 100%
rename from contracts/stake-cw20/schema/query_msg.json
rename to contracts/cw20-stake/schema/query_msg.json
diff --git a/contracts/stake-cw20/schema/staked_balance_at_height_response.json b/contracts/cw20-stake/schema/staked_balance_at_height_response.json
similarity index 100%
rename from contracts/stake-cw20/schema/staked_balance_at_height_response.json
rename to contracts/cw20-stake/schema/staked_balance_at_height_response.json
diff --git a/contracts/stake-cw20/schema/staked_value_response.json b/contracts/cw20-stake/schema/staked_value_response.json
similarity index 100%
rename from contracts/stake-cw20/schema/staked_value_response.json
rename to contracts/cw20-stake/schema/staked_value_response.json
diff --git a/contracts/stake-cw20/schema/token_info_response.json b/contracts/cw20-stake/schema/token_info_response.json
similarity index 100%
rename from contracts/stake-cw20/schema/token_info_response.json
rename to contracts/cw20-stake/schema/token_info_response.json
diff --git a/contracts/stake-cw20/schema/total_staked_at_height_response.json b/contracts/cw20-stake/schema/total_staked_at_height_response.json
similarity index 100%
rename from contracts/stake-cw20/schema/total_staked_at_height_response.json
rename to contracts/cw20-stake/schema/total_staked_at_height_response.json
diff --git a/contracts/stake-cw20/schema/total_value_response.json b/contracts/cw20-stake/schema/total_value_response.json
similarity index 100%
rename from contracts/stake-cw20/schema/total_value_response.json
rename to contracts/cw20-stake/schema/total_value_response.json
diff --git a/contracts/stake-cw20/src/contract.rs b/contracts/cw20-stake/src/contract.rs
similarity index 99%
rename from contracts/stake-cw20/src/contract.rs
rename to contracts/cw20-stake/src/contract.rs
index 5ab97131..8a8f2e77 100644
--- a/contracts/stake-cw20/src/contract.rs
+++ b/contracts/cw20-stake/src/contract.rs
@@ -32,7 +32,7 @@ pub use cw20_base::enumerable::{query_all_accounts, query_all_allowances};
 use cw_controllers::ClaimsResponse;
 use cw_utils::Duration;
 
-const CONTRACT_NAME: &str = "crates.io:stake_cw20";
+const CONTRACT_NAME: &str = "crates.io:cw20-stake";
 const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");
 
 #[cfg_attr(not(feature = "library"), entry_point)]
diff --git a/contracts/stake-cw20/src/error.rs b/contracts/cw20-stake/src/error.rs
similarity index 100%
rename from contracts/stake-cw20/src/error.rs
rename to contracts/cw20-stake/src/error.rs
diff --git a/contracts/stake-cw20/src/hooks.rs b/contracts/cw20-stake/src/hooks.rs
similarity index 100%
rename from contracts/stake-cw20/src/hooks.rs
rename to contracts/cw20-stake/src/hooks.rs
diff --git a/contracts/stake-cw20/src/lib.rs b/contracts/cw20-stake/src/lib.rs
similarity index 100%
rename from contracts/stake-cw20/src/lib.rs
rename to contracts/cw20-stake/src/lib.rs
diff --git a/contracts/stake-cw20/src/msg.rs b/contracts/cw20-stake/src/msg.rs
similarity index 100%
rename from contracts/stake-cw20/src/msg.rs
rename to contracts/cw20-stake/src/msg.rs
diff --git a/contracts/stake-cw20/src/state.rs b/contracts/cw20-stake/src/state.rs
similarity index 100%
rename from contracts/stake-cw20/src/state.rs
rename to contracts/cw20-stake/src/state.rs
diff --git a/contracts/cw20-staked-balance-voting/Cargo.toml b/contracts/cw20-staked-balance-voting/Cargo.toml
index 8b8aca4a..f50a8634 100644
--- a/contracts/cw20-staked-balance-voting/Cargo.toml
+++ b/contracts/cw20-staked-balance-voting/Cargo.toml
@@ -40,7 +40,7 @@ serde = { version = "1.0", default-features = false, features = ["derive"] }
 thiserror = { version = "1.0" }
 cw-core-macros = { version = "*", path = "../../packages/cw-core-macros" }
 cw-core-interface = { version = "*", path = "../../packages/cw-core-interface" }
-stake-cw20 = { path = "../stake-cw20" }
+cw20-stake = { path = "../cw20-stake" }
 cw20-base = {  version = "0.13", features = ["library"] }
 
 [dev-dependencies]
diff --git a/contracts/cw20-staked-balance-voting/schema/migrate_msg.json b/contracts/cw20-staked-balance-voting/schema/migrate_msg.json
new file mode 100644
index 00000000..87b18ea7
--- /dev/null
+++ b/contracts/cw20-staked-balance-voting/schema/migrate_msg.json
@@ -0,0 +1,5 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema#",
+  "title": "MigrateMsg",
+  "type": "object"
+}
diff --git a/contracts/cw20-staked-balance-voting/src/contract.rs b/contracts/cw20-staked-balance-voting/src/contract.rs
index 8c8b589b..4d55c990 100644
--- a/contracts/cw20-staked-balance-voting/src/contract.rs
+++ b/contracts/cw20-staked-balance-voting/src/contract.rs
@@ -65,9 +65,9 @@ pub fn instantiate(
                 } => {
                     let staking_contract_address =
                         deps.api.addr_validate(&staking_contract_address)?;
-                    let resp: stake_cw20::msg::GetConfigResponse = deps.querier.query_wasm_smart(
+                    let resp: cw20_stake::msg::GetConfigResponse = deps.querier.query_wasm_smart(
                         &staking_contract_address,
-                        &stake_cw20::msg::QueryMsg::GetConfig {},
+                        &cw20_stake::msg::QueryMsg::GetConfig {},
                     )?;
 
                     if address != resp.token_address {
@@ -90,7 +90,7 @@ pub fn instantiate(
                         funds: vec![],
                         admin: Some(info.sender.to_string()),
                         label: env.contract.address.to_string(),
-                        msg: to_binary(&stake_cw20::msg::InstantiateMsg {
+                        msg: to_binary(&cw20_stake::msg::InstantiateMsg {
                             owner: Some(info.sender.to_string()),
                             unstaking_duration,
                             token_address: address.to_string(),
@@ -258,9 +258,9 @@ pub fn query_voting_power_at_height(
 ) -> StdResult<Binary> {
     let staking_contract = STAKING_CONTRACT.load(deps.storage)?;
     let address = deps.api.addr_validate(&address)?;
-    let res: stake_cw20::msg::StakedBalanceAtHeightResponse = deps.querier.query_wasm_smart(
+    let res: cw20_stake::msg::StakedBalanceAtHeightResponse = deps.querier.query_wasm_smart(
         staking_contract,
-        &stake_cw20::msg::QueryMsg::StakedBalanceAtHeight {
+        &cw20_stake::msg::QueryMsg::StakedBalanceAtHeight {
             address: address.to_string(),
             height,
         },
@@ -277,9 +277,9 @@ pub fn query_total_power_at_height(
     height: Option<u64>,
 ) -> StdResult<Binary> {
     let staking_contract = STAKING_CONTRACT.load(deps.storage)?;
-    let res: stake_cw20::msg::TotalStakedAtHeightResponse = deps.querier.query_wasm_smart(
+    let res: cw20_stake::msg::TotalStakedAtHeightResponse = deps.querier.query_wasm_smart(
         staking_contract,
-        &stake_cw20::msg::QueryMsg::TotalStakedAtHeight { height },
+        &cw20_stake::msg::QueryMsg::TotalStakedAtHeight { height },
     )?;
     to_binary(&cw_core_interface::voting::TotalPowerAtHeightResponse {
         power: res.total,
@@ -302,10 +302,10 @@ pub fn query_is_active(deps: Deps) -> StdResult<Binary> {
     if let Some(threshold) = threshold {
         let token_contract = TOKEN.load(deps.storage)?;
         let staking_contract = STAKING_CONTRACT.load(deps.storage)?;
-        let actual_power: stake_cw20::msg::TotalStakedAtHeightResponse =
+        let actual_power: cw20_stake::msg::TotalStakedAtHeightResponse =
             deps.querier.query_wasm_smart(
                 staking_contract,
-                &stake_cw20::msg::QueryMsg::TotalStakedAtHeight { height: None },
+                &cw20_stake::msg::QueryMsg::TotalStakedAtHeight { height: None },
             )?;
         match threshold {
             ActiveThreshold::AbsoluteCount { count } => to_binary(&IsActiveResponse {
@@ -375,7 +375,7 @@ pub fn reply(deps: DepsMut, env: Env, msg: Reply) -> Result<Response, ContractEr
                         funds: vec![],
                         admin: Some(dao.to_string()),
                         label: env.contract.address.to_string(),
-                        msg: to_binary(&stake_cw20::msg::InstantiateMsg {
+                        msg: to_binary(&cw20_stake::msg::InstantiateMsg {
                             owner: Some(dao.to_string()),
                             unstaking_duration,
                             token_address: token.to_string(),
diff --git a/contracts/cw4-voting/schema/migrate_msg.json b/contracts/cw4-voting/schema/migrate_msg.json
new file mode 100644
index 00000000..87b18ea7
--- /dev/null
+++ b/contracts/cw4-voting/schema/migrate_msg.json
@@ -0,0 +1,5 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema#",
+  "title": "MigrateMsg",
+  "type": "object"
+}
diff --git a/legacy/cw3-dao/Cargo.toml b/legacy/cw3-dao/Cargo.toml
index bebff6a8..148193c0 100644
--- a/legacy/cw3-dao/Cargo.toml
+++ b/legacy/cw3-dao/Cargo.toml
@@ -21,7 +21,7 @@ cw2 = { version = "0.11" }
 cw3 = { version = "0.11" }
 cw20 = "0.11"
 cw20-base = {  version = "0.11", features = ["library"] }
-stake-cw20 = { path = "../../contracts/stake-cw20" } 
+stake-cw20 = { path = "../../contracts/cw20-stake" }
 cw-storage-plus = {  version = "0.11" }
 cosmwasm-std = { version = "1.0.0" }
 schemars = "0.8.8"


Test patch:
diff --git a/contracts/cw-proposal-single/src/staking_tests.rs b/contracts/cw-proposal-single/src/staking_tests.rs
index 2c0d59d7..85537a66 100644
--- a/contracts/cw-proposal-single/src/staking_tests.rs
+++ b/contracts/cw-proposal-single/src/staking_tests.rs
@@ -39,11 +39,11 @@ fn staked_balances_voting() -> Box<dyn Contract<Empty>> {
     Box::new(contract)
 }
 
-fn stake_cw20() -> Box<dyn Contract<Empty>> {
+fn cw20_stake() -> Box<dyn Contract<Empty>> {
     let contract = ContractWrapper::new(
-        stake_cw20::contract::execute,
-        stake_cw20::contract::instantiate,
-        stake_cw20::contract::query,
+        cw20_stake::contract::execute,
+        cw20_stake::contract::instantiate,
+        cw20_stake::contract::query,
     );
     Box::new(contract)
 }
@@ -64,7 +64,7 @@ fn instantiate_with_staked_balances_voting() {
 
     let govmod_id = app.store_code(single_govmod_contract());
     let cw20_id = app.store_code(cw20_contract());
-    let stake_cw20_id = app.store_code(stake_cw20());
+    let cw20_stake_id = app.store_code(cw20_stake());
     let core_contract_id = app.store_code(core_contract());
     let staked_balances_voting_id = app.store_code(staked_balances_voting());
 
@@ -90,7 +90,7 @@ fn instantiate_with_staked_balances_voting() {
                         amount: Uint128::new(100),
                     }],
                     marketing: None,
-                    staking_code_id: stake_cw20_id,
+                    staking_code_id: cw20_stake_id,
                     unstaking_duration: Some(Duration::Height(10u64)),
                     initial_dao_balance: Some(Uint128::new(100)),
                 },
diff --git a/contracts/cw-proposal-single/src/tests.rs b/contracts/cw-proposal-single/src/tests.rs
index e7eb702f..39300b34 100644
--- a/contracts/cw-proposal-single/src/tests.rs
+++ b/contracts/cw-proposal-single/src/tests.rs
@@ -34,9 +34,9 @@ fn cw20_contract() -> Box<dyn Contract<Empty>> {
 
 fn cw20_stake_contract() -> Box<dyn Contract<Empty>> {
     let contract = ContractWrapper::new(
-        stake_cw20::contract::execute,
-        stake_cw20::contract::instantiate,
-        stake_cw20::contract::query,
+        cw20_stake::contract::execute,
+        cw20_stake::contract::instantiate,
+        cw20_stake::contract::query,
     );
     Box::new(contract)
 }
@@ -92,11 +92,11 @@ fn staked_balances_voting() -> Box<dyn Contract<Empty>> {
     Box::new(contract)
 }
 
-fn stake_cw20() -> Box<dyn Contract<Empty>> {
+fn cw20_stake() -> Box<dyn Contract<Empty>> {
     let contract = ContractWrapper::new(
-        stake_cw20::contract::execute,
-        stake_cw20::contract::instantiate,
-        stake_cw20::contract::query,
+        cw20_stake::contract::execute,
+        cw20_stake::contract::instantiate,
+        cw20_stake::contract::query,
     );
     Box::new(contract)
 }
@@ -150,7 +150,7 @@ fn instantiate_with_staked_balances_governance(
     };
 
     let cw20_id = app.store_code(cw20_contract());
-    let stake_cw20_id = app.store_code(stake_cw20());
+    let cw20_stake_id = app.store_code(cw20_stake());
     let staked_balances_voting_id = app.store_code(staked_balances_voting());
     let core_contract_id = app.store_code(cw_gov_contract());
 
@@ -173,7 +173,7 @@ fn instantiate_with_staked_balances_governance(
                     decimals: 6,
                     initial_balances: initial_balances.clone(),
                     marketing: None,
-                    staking_code_id: stake_cw20_id,
+                    staking_code_id: cw20_stake_id,
                     unstaking_duration: Some(Duration::Height(6)),
                     initial_dao_balance: None,
                 },
@@ -231,7 +231,7 @@ fn instantiate_with_staked_balances_governance(
             &cw20::Cw20ExecuteMsg::Send {
                 contract: staking_contract.to_string(),
                 amount,
-                msg: to_binary(&stake_cw20::msg::ReceiveMsg::Stake {}).unwrap(),
+                msg: to_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(),
             },
             &[],
         )
@@ -2150,7 +2150,7 @@ fn test_active_threshold_absolute() {
     let msg = cw20::Cw20ExecuteMsg::Send {
         contract: staking_contract.to_string(),
         amount: Uint128::new(100),
-        msg: to_binary(&stake_cw20::msg::ReceiveMsg::Stake {}).unwrap(),
+        msg: to_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(),
     };
     app.execute_contract(Addr::unchecked(CREATOR_ADDR), token_contract, &msg, &[])
         .unwrap();
@@ -2171,7 +2171,7 @@ fn test_active_threshold_absolute() {
         .unwrap();
 
     // Unstake some tokens to make it inactive again
-    let msg = stake_cw20::msg::ExecuteMsg::Unstake {
+    let msg = cw20_stake::msg::ExecuteMsg::Unstake {
         amount: Uint128::new(50),
     };
     app.execute_contract(Addr::unchecked(CREATOR_ADDR), staking_contract, &msg, &[])
@@ -2276,7 +2276,7 @@ fn test_active_threshold_percent() {
     let msg = cw20::Cw20ExecuteMsg::Send {
         contract: staking_contract.to_string(),
         amount: Uint128::new(20000000),
-        msg: to_binary(&stake_cw20::msg::ReceiveMsg::Stake {}).unwrap(),
+        msg: to_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(),
     };
     app.execute_contract(Addr::unchecked(CREATOR_ADDR), token_contract, &msg, &[])
         .unwrap();
@@ -2297,7 +2297,7 @@ fn test_active_threshold_percent() {
         .unwrap();
 
     // Unstake some tokens to make it inactive again
-    let msg = stake_cw20::msg::ExecuteMsg::Unstake {
+    let msg = cw20_stake::msg::ExecuteMsg::Unstake {
         amount: Uint128::new(1000),
     };
     app.execute_contract(Addr::unchecked(CREATOR_ADDR), staking_contract, &msg, &[])
@@ -2380,7 +2380,7 @@ fn test_active_threshold_none() {
     let msg = cw20::Cw20ExecuteMsg::Send {
         contract: staking_contract.to_string(),
         amount: Uint128::new(2000),
-        msg: to_binary(&stake_cw20::msg::ReceiveMsg::Stake {}).unwrap(),
+        msg: to_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(),
     };
     app.execute_contract(Addr::unchecked(CREATOR_ADDR), token_contract, &msg, &[])
         .unwrap();
diff --git a/contracts/stake-cw20-reward-distributor/src/error.rs b/contracts/cw20-stake-reward-distributor/src/error.rs
similarity index 100%
rename from contracts/stake-cw20-reward-distributor/src/error.rs
rename to contracts/cw20-stake-reward-distributor/src/error.rs
diff --git a/contracts/stake-cw20-reward-distributor/src/lib.rs b/contracts/cw20-stake-reward-distributor/src/lib.rs
similarity index 100%
rename from contracts/stake-cw20-reward-distributor/src/lib.rs
rename to contracts/cw20-stake-reward-distributor/src/lib.rs
diff --git a/contracts/stake-cw20-reward-distributor/src/msg.rs b/contracts/cw20-stake-reward-distributor/src/msg.rs
similarity index 100%
rename from contracts/stake-cw20-reward-distributor/src/msg.rs
rename to contracts/cw20-stake-reward-distributor/src/msg.rs
diff --git a/contracts/stake-cw20-reward-distributor/src/state.rs b/contracts/cw20-stake-reward-distributor/src/state.rs
similarity index 100%
rename from contracts/stake-cw20-reward-distributor/src/state.rs
rename to contracts/cw20-stake-reward-distributor/src/state.rs
diff --git a/contracts/stake-cw20-reward-distributor/src/tests.rs b/contracts/cw20-stake-reward-distributor/src/tests.rs
similarity index 98%
rename from contracts/stake-cw20-reward-distributor/src/tests.rs
rename to contracts/cw20-stake-reward-distributor/src/tests.rs
index bd1c055b..26ff3a79 100644
--- a/contracts/stake-cw20-reward-distributor/src/tests.rs
+++ b/contracts/cw20-stake-reward-distributor/src/tests.rs
@@ -22,9 +22,9 @@ pub fn cw20_contract() -> Box<dyn Contract<Empty>> {
 
 fn staking_contract() -> Box<dyn Contract<Empty>> {
     let contract = ContractWrapper::new(
-        stake_cw20::contract::execute,
-        stake_cw20::contract::instantiate,
-        stake_cw20::contract::query,
+        cw20_stake::contract::execute,
+        cw20_stake::contract::instantiate,
+        cw20_stake::contract::query,
     );
     Box::new(contract)
 }
@@ -55,7 +55,7 @@ fn instantiate_cw20(app: &mut App, initial_balances: Vec<Cw20Coin>) -> Addr {
 
 fn instantiate_staking(app: &mut App, cw20_addr: Addr) -> Addr {
     let staking_id = app.store_code(staking_contract());
-    let msg = stake_cw20::msg::InstantiateMsg {
+    let msg = cw20_stake::msg::InstantiateMsg {
         owner: Some(OWNER.to_string()),
         manager: Some(MANAGER.to_string()),
         token_address: cw20_addr.to_string(),
diff --git a/contracts/cw20-staked-balance-voting/src/tests.rs b/contracts/cw20-staked-balance-voting/src/tests.rs
index b583d1b7..5d87c153 100644
--- a/contracts/cw20-staked-balance-voting/src/tests.rs
+++ b/contracts/cw20-staked-balance-voting/src/tests.rs
@@ -23,9 +23,9 @@ fn cw20_contract() -> Box<dyn Contract<Empty>> {
 
 fn staking_contract() -> Box<dyn Contract<Empty>> {
     let contract = ContractWrapper::new(
-        stake_cw20::contract::execute,
-        stake_cw20::contract::instantiate,
-        stake_cw20::contract::query,
+        cw20_stake::contract::execute,
+        cw20_stake::contract::instantiate,
+        cw20_stake::contract::query,
     );
     Box::new(contract)
 }
@@ -57,7 +57,7 @@ fn stake_tokens(app: &mut App, staking_addr: Addr, cw20_addr: Addr, sender: &str
     let msg = cw20::Cw20ExecuteMsg::Send {
         contract: staking_addr.to_string(),
         amount: Uint128::new(amount),
-        msg: to_binary(&stake_cw20::msg::ReceiveMsg::Stake {}).unwrap(),
+        msg: to_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(),
     };
     app.execute_contract(Addr::unchecked(sender), cw20_addr, &msg, &[])
         .unwrap();