From 7bdf091f4673da29644c25b5067370d43d2c2e6f Mon Sep 17 00:00:00 2001 From: quasisamurai Date: Mon, 13 Mar 2023 16:49:01 +0400 Subject: [PATCH] rm commented code --- .../src/testing/instantiate.rs | 116 ------------------ packages/cwd-testing/src/contracts.rs | 29 ----- 2 files changed, 145 deletions(-) diff --git a/contracts/dao/proposal/cwd-proposal-multiple/src/testing/instantiate.rs b/contracts/dao/proposal/cwd-proposal-multiple/src/testing/instantiate.rs index da268440..98c47d96 100644 --- a/contracts/dao/proposal/cwd-proposal-multiple/src/testing/instantiate.rs +++ b/contracts/dao/proposal/cwd-proposal-multiple/src/testing/instantiate.rs @@ -34,45 +34,6 @@ fn get_pre_propose_info( } } -// fn _get_default_token_dao_proposal_module_instantiate(app: &mut App) -> InstantiateMsg { -// let quorum = PercentageThreshold::Majority {}; -// let voting_strategy = VotingStrategy::SingleChoice { quorum }; -// -// InstantiateMsg { -// voting_strategy, -// max_voting_period: Duration::Time(604800), // One week. -// min_voting_period: None, -// only_members_execute: true, -// allow_revoting: false, -// pre_propose_info: get_pre_propose_info( -// app, -// Some(UncheckedDepositInfo { -// denom: cwd_voting::deposit::DepositToken::VotingModuleToken {}, -// amount: Uint128::new(10_000_000), -// refund_policy: DepositRefundPolicy::OnlyPassed, -// }), -// false, -// ), -// close_proposal_on_execution_failure: true, -// } -// } - -// // Same as above but no proposal deposit. -// fn _get_default_non_token_dao_proposal_module_instantiate(app: &mut App) -> InstantiateMsg { -// let quorum = PercentageThreshold::Majority {}; -// let voting_strategy = VotingStrategy::SingleChoice { quorum }; -// -// InstantiateMsg { -// voting_strategy, -// max_voting_period: Duration::Time(604800), // One week. -// min_voting_period: None, -// only_members_execute: true, -// allow_revoting: false, -// pre_propose_info: get_pre_propose_info(app, None, false), -// close_proposal_on_execution_failure: true, -// } -// } - pub(crate) fn neutron_vault_contract() -> Box> { let contract: ContractWrapper<_, _, _, _, _, _, NeutronMsg> = ContractWrapper::new_with_empty( neutron_vault::contract::execute, @@ -216,80 +177,3 @@ pub(crate) fn instantiate_with_native_bonded_balances_governance( core_addr } - -// pub fn _instantiate_with_cw4_groups_governance( -// app: &mut App, -// proposal_module_instantiate: InstantiateMsg, -// initial_weights: Option>, -// ) -> Addr { -// let proposal_module_code_id = app.store_code(proposal_multiple_contract()); -// let cw4_id = app.store_code(cw4_contract()); -// let core_id = app.store_code(cwd_core_contract()); -// let votemod_id = app.store_code(cw4_contract()); -// -// let initial_weights = initial_weights.unwrap_or_else(|| { -// vec![Cw20Coin { -// address: CREATOR_ADDR.to_string(), -// amount: Uint128::new(1), -// }] -// }); -// -// // Remove duplicates so that we can test duplicate voting. -// let initial_weights: Vec = { -// let mut already_seen = vec![]; -// initial_weights -// .into_iter() -// .filter(|Cw20Coin { address, .. }| { -// if already_seen.contains(address) { -// false -// } else { -// already_seen.push(address.clone()); -// true -// } -// }) -// .map(|Cw20Coin { address, amount }| cw4::Member { -// addr: address, -// weight: amount.u128() as u64, -// }) -// .collect() -// }; -// -// let governance_instantiate = cwd_core::msg::InstantiateMsg { -// name: "DAO DAO".to_string(), -// description: "A DAO that builds DAOs".to_string(), -// voting_registry_module_instantiate_info: ModuleInstantiateInfo { -// code_id: votemod_id, -// msg: to_binary(&cwd_voting_cw4::msg::InstantiateMsg { -// cw4_group_code_id: cw4_id, -// initial_members: initial_weights, -// }) -// .unwrap(), -// admin: Some(Admin::CoreModule {}), -// label: "DAO DAO voting module".to_string(), -// }, -// proposal_modules_instantiate_info: vec![ModuleInstantiateInfo { -// code_id: proposal_module_code_id, -// msg: to_binary(&proposal_module_instantiate).unwrap(), -// admin: Some(Admin::CoreModule {}), -// label: "DAO DAO governance module".to_string(), -// }], -// initial_items: None, -// dao_uri: None, -// }; -// -// let addr = app -// .instantiate_contract( -// core_id, -// Addr::unchecked(CREATOR_ADDR), -// &governance_instantiate, -// &[], -// "DAO DAO", -// None, -// ) -// .unwrap(); -// -// // Update the block so that weights appear. -// app.update_block(|block| block.height += 1); -// -// addr -// } diff --git a/packages/cwd-testing/src/contracts.rs b/packages/cwd-testing/src/contracts.rs index 3e49c345..1bb88309 100644 --- a/packages/cwd-testing/src/contracts.rs +++ b/packages/cwd-testing/src/contracts.rs @@ -52,32 +52,3 @@ pub fn pre_propose_multiple_contract() -> Box> { ); Box::new(contract) } - -// pub fn native_staked_balances_voting_contract() -> Box> { -// let contract = ContractWrapper::new( -// cwd_voting_native_staked::contract::execute, -// cwd_voting_native_staked::contract::instantiate, -// cwd_voting_native_staked::contract::query, -// ); -// Box::new(contract) -// } - -// pub fn cwd_core_contract() -> Box> { -// let contract = ContractWrapper::new( -// cwd_core::contract::execute, -// cwd_core::contract::instantiate, -// cwd_core::contract::query, -// ) -// .with_reply(cwd_core::contract::reply); -// Box::new(contract) -// } - -// pub fn cwd_voting_cw4_contract() -> Box> { -// let contract = ContractWrapper::new( -// cwd_voting_cw4::contract::execute, -// cwd_voting_cw4::contract::instantiate, -// cwd_voting_cw4::contract::query, -// ) -// .with_reply(cwd_voting_cw4::contract::reply); -// Box::new(contract) -// }