Skip to content

Commit

Permalink
Merge pull request #156 from DA0-DA0/shipping
Browse files Browse the repository at this point in the history
Remove stake_cw20_gov
  • Loading branch information
JakeHartnell authored Feb 1, 2022
2 parents d68bfcf + 0c4a949 commit 799b6aa
Show file tree
Hide file tree
Showing 29 changed files with 16 additions and 2,402 deletions.
21 changes: 1 addition & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ incremental = false
codegen-units = 1
incremental = false

[profile.release.package.stake-cw20-gov]
codegen-units = 1
incremental = false

[profile.release.package.cw-distribution]
codegen-units = 1
incremental = false
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
| [cw3-multisig](contracts/cw3-multisig) | A multisig contract. |
| [cw4-registry](contracts/cw4-registry) | A contract for indexing multisig group members. |
| [stake-cw20](contracts/stake-cw20) | A cw20 staking contract. |
| [stake-cw20-gov](contracts/stake-cw20-gov) | A cw20 staking contract, with vote delegation. |

NOTE: _These contracts have yet to be audited. Please see the [disclaimer](#Disclaimer)._

Expand Down
2 changes: 1 addition & 1 deletion contracts/cw3-dao/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cw2 = { version = "0.11" }
cw3 = { version = "0.11" }
cw20 = "0.11"
cw20-base = { version = "0.11", features = ["library"] }
stake-cw20-gov = { path = "../stake-cw20-gov" }
stake-cw20 = { path = "../stake-cw20" }
cw-storage-plus = { version = "0.11" }
cosmwasm-std = { version = "1.0.0-beta" }
schemars = "0.8.8"
Expand Down
4 changes: 2 additions & 2 deletions contracts/cw3-dao/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ pub fn instantiate(
funds: vec![],
admin: Some(env.contract.address.to_string()),
label,
msg: to_binary(&stake_cw20_gov::msg::InstantiateMsg {
msg: to_binary(&stake_cw20::msg::InstantiateMsg {
admin: env.contract.address,
unstaking_duration,
token_address: cw20_addr.addr(),
Expand Down Expand Up @@ -739,7 +739,7 @@ pub fn reply(deps: DepsMut, env: Env, msg: Reply) -> Result<Response, ContractEr
funds: vec![],
admin: Some(env.contract.address.to_string()),
label: env.contract.address.to_string(),
msg: to_binary(&stake_cw20_gov::msg::InstantiateMsg {
msg: to_binary(&stake_cw20::msg::InstantiateMsg {
admin: env.contract.address,
unstaking_duration,
token_address: cw20_addr,
Expand Down
7 changes: 3 additions & 4 deletions contracts/cw3-dao/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ use cosmwasm_std::{
};
use cw20::Cw20ExecuteMsg;

use stake_cw20_gov::msg::{
QueryMsg as StakingContractQueryMsg, StakedBalanceAtHeightResponse,
TotalStakedAtHeightResponse, VotingPowerAtHeightResponse,
use stake_cw20::msg::{
QueryMsg as StakingContractQueryMsg, StakedBalanceAtHeightResponse, TotalStakedAtHeightResponse,
};

use crate::{
Expand Down Expand Up @@ -88,7 +87,7 @@ pub fn get_voting_power_at_height(deps: Deps, address: Addr, height: u64) -> Std
let staking_contract = STAKING_CONTRACT.load(deps.storage)?;

// Get voting power at height
let balance: VotingPowerAtHeightResponse = deps.querier.query_wasm_smart(
let balance: StakedBalanceAtHeightResponse = deps.querier.query_wasm_smart(
staking_contract,
&StakingContractQueryMsg::StakedBalanceAtHeight {
address: address.to_string(),
Expand Down
8 changes: 4 additions & 4 deletions contracts/cw3-dao/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use cw20::{
use cw3::{Status, Vote};
use cw_multi_test::{next_block, App, BankSudo, Contract, ContractWrapper, Executor, SudoMsg};
use cw_utils::{Duration, Expiration};
use stake_cw20_gov::msg::ReceiveMsg;
use stake_cw20::msg::ReceiveMsg;
use std::borrow::BorrowMut;

const OWNER: &str = "admin0001";
Expand Down Expand Up @@ -55,9 +55,9 @@ pub fn contract_cw20_gov() -> Box<dyn Contract<Empty>> {

pub fn contract_staking() -> Box<dyn Contract<Empty>> {
let contract = ContractWrapper::new(
stake_cw20_gov::contract::execute,
stake_cw20_gov::contract::instantiate,
stake_cw20_gov::contract::query,
stake_cw20::contract::execute,
stake_cw20::contract::instantiate,
stake_cw20::contract::query,
);
Box::new(contract)
}
Expand Down
6 changes: 0 additions & 6 deletions contracts/stake-cw20-gov/.cargo/config

This file was deleted.

Loading

0 comments on commit 799b6aa

Please sign in to comment.