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 authored Nov 8, 2024
1 parent a48363e commit e7f3e28
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 24 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion contracts/distribution/cw-fund-distributor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ dao-interface = { workspace = true }
cw-paginate-storage = { workspace = true }

[dev-dependencies]
cw-fund-distributor = { workspace = true }
dao-dao-core = { workspace = true, features = ["library"] }
dao-testing = { workspace = true }
cw-multi-test = { workspace = true }
Expand Down
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 @@ -2,20 +2,21 @@ use crate::msg::{
CW20EntitlementResponse, CW20Response, DenomResponse, ExecuteMsg, InstantiateMsg, MigrateMsg,
NativeEntitlementResponse, QueryMsg, TotalPowerResponse, VotingContractResponse,
};
use crate::ContractError;
use cosmwasm_std::{to_json_binary, Addr, Binary, Coin, Uint128, WasmMsg};
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
1 change: 0 additions & 1 deletion packages/dao-testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ serde_json = { workspace = true }

btsg-ft-factory = { workspace = true }
cw-admin-factory = { workspace = true }
cw-fund-distributor = { workspace = true }
cw-hooks = { workspace = true }
cw-payroll-factory = { workspace = true }
cw-token-swap = { workspace = true }
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 e7f3e28

Please sign in to comment.