Skip to content

Commit

Permalink
remove dao-testing dependency on cw-fund-distributor and don't publish
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Nov 8, 2024
1 parent a48363e commit a46ff43
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ use cw20::{BalanceResponse, Cw20Coin};
use cw_multi_test::{next_block, App, BankSudo, Executor, SudoMsg};
use cw_utils::Duration;
use dao_testing::contracts::{
cw20_base_contract, cw20_stake_contract, cw_fund_distributor_contract,
dao_voting_cw20_staked_contract,
cw20_base_contract, cw20_stake_contract, dao_voting_cw20_staked_contract,
};

use super::cw_fund_distributor_contract;

const CREATOR_ADDR: &str = "creator";
const FEE_DENOM: &str = "ujuno";

Expand Down
13 changes: 13 additions & 0 deletions contracts/distribution/cw-fund-distributor/src/testing/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
use cosmwasm_std::Empty;
use cw_multi_test::{Contract, ContractWrapper};

mod adversarial_tests;
mod tests;

pub fn cw_fund_distributor_contract() -> Box<dyn Contract<Empty>> {
let contract = ContractWrapper::new(
crate::contract::execute,
crate::contract::instantiate,
crate::contract::query,
)
.with_migrate(crate::contract::migrate);
Box::new(contract)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ use cw20::Cw20Coin;
use cw_fund_distributor::ContractError;
use cw_multi_test::{next_block, App, BankSudo, Executor, SudoMsg};
use dao_testing::contracts::{
cw20_base_contract, cw20_stake_contract, cw_fund_distributor_contract,
dao_voting_cw20_staked_contract,
cw20_base_contract, cw20_stake_contract, dao_voting_cw20_staked_contract,
};

use crate::msg::ExecuteMsg::{ClaimAll, ClaimCW20, ClaimNatives};
use crate::msg::QueryMsg::TotalPower;
use cosmwasm_std::StdError::GenericErr;
use cw_utils::Duration;

use super::cw_fund_distributor_contract;

const CREATOR_ADDR: &str = "creator";
const FEE_DENOM: &str = "ujuno";

Expand Down
10 changes: 0 additions & 10 deletions packages/dao-testing/src/contracts/latest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,6 @@ pub fn dao_test_custom_factory_contract() -> Box<dyn Contract<Empty>> {
Box::new(contract)
}

pub fn cw_fund_distributor_contract() -> Box<dyn Contract<Empty>> {
let contract = ContractWrapper::new(
cw_fund_distributor::contract::execute,
cw_fund_distributor::contract::instantiate,
cw_fund_distributor::contract::query,
)
.with_migrate(cw_fund_distributor::contract::migrate);
Box::new(contract)
}

pub fn dao_rewards_distributor_contract() -> Box<dyn Contract<Empty>> {
let contract = ContractWrapper::new(
dao_rewards_distributor::contract::execute,
Expand Down
5 changes: 0 additions & 5 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,6 @@ cd contracts/external/cw-admin-factory
cargo hack publish --no-dev-deps --allow-dirty
cd "$START_DIR"

# TODO: uncomment once cleaned up and audited
# cd contracts/distribution/cw-fund-distributor
# cargo hack publish --no-dev-deps --allow-dirty
# cd "$START_DIR"

cd contracts/distribution/dao-rewards-distributor
cargo hack publish --no-dev-deps --allow-dirty
cd "$START_DIR"
Expand Down

0 comments on commit a46ff43

Please sign in to comment.