Skip to content

Commit

Permalink
Clippy and test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kayanski committed Nov 28, 2024
1 parent 2630eb3 commit d0741f0
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 79 deletions.
12 changes: 4 additions & 8 deletions framework/packages/abstract-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,16 @@ version = "0.25.0"
workspace = true

[features]
default = ["test-utils"]
interchain = [
"dep:cw-orch-interchain",
"abstract-interface/interchain",
"abstract-interface/testing",
]
test-utils = ["cw-asset", "cw20", "cw20-base", "cw-plus-interface"]
default = []
interchain = ["dep:cw-orch-interchain", "abstract-interface/interchain"]
test-utils = ["cw-asset", "cw20", "cw20-base", "cw-plus-interface", "abstract-interface/testing"]

[dependencies]
abstract-interface = { version = "0.25.0", path = "../abstract-interface" }
abstract-std.workspace = true
cosmwasm-std.workspace = true
cw-orch.workspace = true
cw-orch-interchain = { workspace = true, optional = true }
cw-orch.workspace = true
semver.workspace = true
serde.workspace = true
thiserror.workspace = true
Expand Down
1 change: 0 additions & 1 deletion framework/packages/abstract-client/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ impl<Chain: CwEnv> AbstractClientBuilder<Chain> {
/// Deploy abstract with current configuration
pub fn build(&self) -> AbstractClientResult<AbstractClient<Chain>> {
let abstr = Abstract::deploy_on(self.chain.clone(), ())?;
println!("quid");
self.update_ans(&abstr)?;

AbstractClient::new(self.chain.clone())
Expand Down
5 changes: 0 additions & 5 deletions integrations/taplo.toml

This file was deleted.

1 change: 1 addition & 0 deletions integrations/taplo.toml
4 changes: 2 additions & 2 deletions interchain/modules-clone-testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ cw-orch-clone-testing = { workspace = true }
cw20 = { workspace = true }

abstract-app = { workspace = true, features = ["test-utils"] }
abstract-client = { workspace = true }
abstract-interface = { workspace = true, features = ["daemon"] }
abstract-client = { workspace = true, features = ["test-utils"] }
abstract-interface = { workspace = true, features = ["testing", "daemon"] }

anyhow = { workspace = true }
env_logger = "0.11.3"
Expand Down
2 changes: 1 addition & 1 deletion interchain/modules-clone-testing/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn load_abstr(chain: ChainInfo) -> anyhow::Result<AbstractClient<CloneTestin
// Allow registration of any module
abstr_deployment
.registry()
.update_config(None, Some(true))?;
.update_config(None, Some(false))?;

Ok(abstr_deployment)
}
54 changes: 2 additions & 52 deletions interchain/modules-clone-testing/tests/dex/astrovault.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,23 +134,11 @@ mod standard_pool_tests {
"archway1j5vevvsrm5ayqmfvhng7rkkgjqad37pk35j3nanzmevlq4ntwpfqayv6z4";

use super::*;
use abstract_dex_adapter::{interface::DexAdapter, msg::DexInstantiateMsg, DEX_ADAPTER_ID};
use abstract_interface::AdapterDeployer;
use abstract_interface::DeployStrategy;
use cosmwasm_std::Decimal;

fn setup_standard_pool() -> anyhow::Result<DexTester<CloneTesting, AstrovaultDex>> {
let chain_info = ARCHWAY_1;
let abstr_deployment = load_abstr(chain_info)?;
// Deploy the dex adapter
DexAdapter::new(DEX_ADAPTER_ID, abstr_deployment.environment()).deploy(
abstract_dex_adapter::contract::CONTRACT_VERSION.parse()?,
DexInstantiateMsg {
recipient_account: 0,
swap_fee: Decimal::permille(3),
},
DeployStrategy::Try,
)?;

let chain = abstr_deployment.environment();

let asset_a = (
Expand Down Expand Up @@ -303,23 +291,11 @@ mod xasset_stable_pool_tests {
"archway123h0jfnk3rhhuapkytrzw22u6w4xkf563lqhy42a9r5lmv32w73s8f6ql2";

use super::*;
use abstract_dex_adapter::{interface::DexAdapter, msg::DexInstantiateMsg, DEX_ADAPTER_ID};
use abstract_interface::AdapterDeployer;
use abstract_interface::DeployStrategy;
use cosmwasm_std::Decimal;

fn setup_stable_pool() -> anyhow::Result<DexTester<CloneTesting, AstrovaultDex>> {
let chain_info = ARCHWAY_1;
let abstr_deployment = load_abstr(chain_info)?;
// Deploy the dex adapter
DexAdapter::new(DEX_ADAPTER_ID, abstr_deployment.environment()).deploy(
abstract_dex_adapter::contract::CONTRACT_VERSION.parse()?,
DexInstantiateMsg {
recipient_account: 0,
swap_fee: Decimal::permille(3),
},
DeployStrategy::Try,
)?;

let chain = abstr_deployment.environment();

let asset_a = (
Expand Down Expand Up @@ -420,23 +396,10 @@ mod stable_pool_tests {
use cosmwasm_std::coins;

use super::*;
use abstract_dex_adapter::{interface::DexAdapter, msg::DexInstantiateMsg, DEX_ADAPTER_ID};
use abstract_interface::AdapterDeployer;
use abstract_interface::DeployStrategy;
use cosmwasm_std::Decimal;

fn setup_stable_pool() -> anyhow::Result<DexTester<CloneTesting, AstrovaultDex>> {
let chain_info = ARCHWAY_1;
let abstr_deployment = load_abstr(chain_info)?;
// Deploy the dex adapter
DexAdapter::new(DEX_ADAPTER_ID, abstr_deployment.environment()).deploy(
abstract_dex_adapter::contract::CONTRACT_VERSION.parse()?,
DexInstantiateMsg {
recipient_account: 0,
swap_fee: Decimal::permille(3),
},
DeployStrategy::Try,
)?;
let chain = abstr_deployment.environment();

let asset_a = (
Expand Down Expand Up @@ -581,10 +544,6 @@ mod ratio_pool_tests {
use cosmwasm_std::{coins, Uint128};

use super::*;
use abstract_dex_adapter::{interface::DexAdapter, msg::DexInstantiateMsg, DEX_ADAPTER_ID};
use abstract_interface::AdapterDeployer;
use abstract_interface::DeployStrategy;
use cosmwasm_std::Decimal;

// Astrovault ratio calculator reference
//
Expand Down Expand Up @@ -634,15 +593,6 @@ mod ratio_pool_tests {
fn setup_ratio_pool() -> anyhow::Result<DexTester<CloneTesting, AstrovaultDex>> {
let chain_info = ARCHWAY_1;
let abstr_deployment = load_abstr(chain_info)?;
// Deploy the dex adapter
DexAdapter::new(DEX_ADAPTER_ID, abstr_deployment.environment()).deploy(
abstract_dex_adapter::contract::CONTRACT_VERSION.parse()?,
DexInstantiateMsg {
recipient_account: 0,
swap_fee: Decimal::permille(3),
},
DeployStrategy::Try,
)?;
let chain = abstr_deployment.environment();

let asset_a = (
Expand Down
5 changes: 0 additions & 5 deletions interchain/taplo.toml

This file was deleted.

1 change: 1 addition & 0 deletions interchain/taplo.toml
5 changes: 0 additions & 5 deletions modules/taplo.toml

This file was deleted.

1 change: 1 addition & 0 deletions modules/taplo.toml
7 changes: 7 additions & 0 deletions taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
exclude = ["workspace-hack/Cargo.toml"]

[formatting]
align_entries = true
column_width = 100
inline_table_expand = false
reorder_keys = true

0 comments on commit d0741f0

Please sign in to comment.