diff --git a/integrations/Cargo.toml b/integrations/Cargo.toml index 01fd1fe579..e14ee8408a 100644 --- a/integrations/Cargo.toml +++ b/integrations/Cargo.toml @@ -2,7 +2,7 @@ members = [ # "astroport-adapter", "astrovault-adapter", - # "bundles/*", + "bundles/*", "osmosis-adapter", "wyndex-adapter", "kujira-adapter", diff --git a/integrations/bundles/mockdex/Cargo.toml b/integrations/bundles/mockdex/Cargo.toml index b71a609a89..67b77f82d0 100644 --- a/integrations/bundles/mockdex/Cargo.toml +++ b/integrations/bundles/mockdex/Cargo.toml @@ -8,21 +8,25 @@ version = { workspace = true } [dependencies] -cw-controllers = "2.0.0" -wyndex = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" } -wyndex-factory = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" } -wyndex-multi-hop = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" } -wyndex-pair = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" } -wyndex-stake = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" } +cw-controllers = "2.0.0" +# wyndex = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" } +# wyndex-factory = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" } +# wyndex-multi-hop = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" } +# wyndex-pair = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" } +# wyndex-stake = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" } +wyndex = { git = "https://github.com/abstractsdk/wynddex", rev = "cbe316f17c4a89d0c3938ea66747a5ff1fc5a5e9" } +wyndex-factory = { git = "https://github.com/abstractsdk/wynddex", rev = "cbe316f17c4a89d0c3938ea66747a5ff1fc5a5e9" } +wyndex-multi-hop = { git = "https://github.com/abstractsdk/wynddex", rev = "cbe316f17c4a89d0c3938ea66747a5ff1fc5a5e9" } +wyndex-pair = { git = "https://github.com/abstractsdk/wynddex", rev = "cbe316f17c4a89d0c3938ea66747a5ff1fc5a5e9" } +wyndex-stake = { git = "https://github.com/abstractsdk/wynddex", rev = "cbe316f17c4a89d0c3938ea66747a5ff1fc5a5e9" } -abstract-interface = { workspace = true, features = ["testing"] } -abstract-std = { workspace = true } -anyhow = { workspace = true } -cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true } -cw-asset = { workspace = true } -cw-orch = { workspace = true } -cw-plus-interface.workspace = true -cw-plus-orch = "0.25.0" -cw20 = { workspace = true } -cw20-base = { workspace = true } +abstract-interface = { workspace = true, features = ["testing"] } +abstract-std = { workspace = true } +anyhow = { workspace = true } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true } +cw-asset = { workspace = true } +cw-orch = { workspace = true } +cw-plus-orch = { workspace = true } +cw20 = { workspace = true } +cw20-base = { workspace = true } diff --git a/integrations/bundles/mockdex/src/lib.rs b/integrations/bundles/mockdex/src/lib.rs index 06e9270e5b..038be5057d 100644 --- a/integrations/bundles/mockdex/src/lib.rs +++ b/integrations/bundles/mockdex/src/lib.rs @@ -13,7 +13,7 @@ use abstract_std::{ use cosmwasm_std::{coin, Decimal, Uint128}; use cw20::Cw20Coin; use cw_orch::prelude::*; -use cw_plus_interface::cw20_base::Cw20Base as AbstractCw20Base; +use cw_plus_orch::cw20_base::Cw20Base as AbstractCw20Base; use wyndex::{ asset::{AssetInfo, AssetInfoExt}, factory::{DefaultStakeConfig, PartialStakeConfig}, @@ -164,6 +164,7 @@ impl Deploy for WynDex { min_bond: Uint128::new(1), unbonding_periods: vec![1, 2], max_distributions: 1, + converter: None, }) .build(&chain); @@ -443,11 +444,6 @@ impl Deploy for WynDex { Box::new(&mut self.raw_eur_lp), ] } - - // This is only a mock deploy - fn deployed_state_file_path() -> Option { - None - } } impl WynDex { /// registers the WynDex contracts and assets on Abstract diff --git a/integrations/bundles/mockdex/src/suite.rs b/integrations/bundles/mockdex/src/suite.rs index 0ddc3fe9f9..2dfb7ac671 100644 --- a/integrations/bundles/mockdex/src/suite.rs +++ b/integrations/bundles/mockdex/src/suite.rs @@ -111,6 +111,7 @@ impl SuiteBuilder { min_bond: Uint128::new(1000), unbonding_periods: vec![60 * 60 * 24 * 7, 60 * 60 * 24 * 14, 60 * 60 * 24 * 21], max_distributions: 6, + converter: None, }, trading_starts: None, } diff --git a/integrations/bundles/mockdex/tests/abstract.rs b/integrations/bundles/mockdex/tests/abstract.rs index 877426b07e..60a94a4aec 100644 --- a/integrations/bundles/mockdex/tests/abstract.rs +++ b/integrations/bundles/mockdex/tests/abstract.rs @@ -1,14 +1,13 @@ mod abstrct { use abstract_interface::Abstract; use cw_orch::prelude::*; - use wyndex_bundle::WynDex; + use mockdex_bundle::WynDex; #[test] fn deploy() { let mock = MockBech32::new("mock"); - let owner = mock.sender_addr(); - Abstract::deploy_on(mock.clone(), owner.to_string()).unwrap(); + Abstract::deploy_on(mock.clone(), ()).unwrap(); let deployed = WynDex::deploy_on(mock.clone(), Empty {}).unwrap(); let loaded = WynDex::load_from(mock).unwrap(); diff --git a/integrations/bundles/mockdex/tests/staking.rs b/integrations/bundles/mockdex/tests/staking.rs index bd145bec42..896f9421f5 100644 --- a/integrations/bundles/mockdex/tests/staking.rs +++ b/integrations/bundles/mockdex/tests/staking.rs @@ -2,9 +2,10 @@ use cosmwasm_std::{coin, from_json, Addr, Decimal, Uint128}; use wyndex::{ asset::{AssetInfo, AssetInfoExt}, factory::PartialStakeConfig, + stake::ReceiveMsg, }; use wyndex_stake::{ - msg::{QueryMsg as StakeQueryMsg, ReceiveDelegationMsg, StakedResponse}, + msg::{QueryMsg as StakeQueryMsg, StakedResponse}, state::Config as WyndexStakeConfig, }; @@ -12,8 +13,8 @@ mod staking { use super::*; use cw_orch::mock::MockBech32; use cw_orch::prelude::TxHandler; + use mockdex_bundle::{suite::SuiteBuilder, WYNDEX_OWNER}; use wyndex::factory::{DefaultStakeConfig, DistributionFlow}; - use wyndex_bundle::{suite::SuiteBuilder, WYNDEX_OWNER}; #[test] fn basic() { @@ -40,6 +41,7 @@ mod staking { min_bond: Uint128::new(1), unbonding_periods: vec![1, 2], max_distributions: 1, + converter: None, }) .build(&mock); @@ -92,7 +94,7 @@ mod staking { &pair_info.liquidity_token, 1000, &pair_info.staking_addr, - ReceiveDelegationMsg::Delegate { + ReceiveMsg::Delegate { unbonding_period: 1, delegate_as: None, }, @@ -190,6 +192,7 @@ mod staking { min_bond: Uint128::new(1), unbonding_periods: vec![1], max_distributions: 3, + converter: None, }) .build(&mock); diff --git a/integrations/bundles/mockdex/tests/swap.rs b/integrations/bundles/mockdex/tests/swap.rs index 0a01f206dc..7f3a00cfa3 100644 --- a/integrations/bundles/mockdex/tests/swap.rs +++ b/integrations/bundles/mockdex/tests/swap.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{coin, testing::mock_env}; use cw_orch::mock::MockBech32; use cw_orch::prelude::TxHandler; +use mockdex_bundle::suite::SuiteBuilder; use wyndex::asset::{AssetInfo, AssetInfoExt}; -use wyndex_bundle::suite::SuiteBuilder; use wyndex_multi_hop::msg::SwapOperation; #[test] diff --git a/interchain/framework-clone-testing/tests/upgrade-account.rs b/interchain/framework-clone-testing/tests/upgrade-account.rs index 371cd7fe22..46293cc9de 100644 --- a/interchain/framework-clone-testing/tests/upgrade-account.rs +++ b/interchain/framework-clone-testing/tests/upgrade-account.rs @@ -4,7 +4,6 @@ use abstract_framework_clone_testing::common; use abstract_interface::{Abstract, AccountDetails, AccountI, AccountQueryFns, RegistryQueryFns}; use abstract_std::objects::AccountId; -use abstract_testing::TEST_VERSION; use anyhow::bail; use cw_orch::{daemon::networks::PION_1, prelude::*}; use cw_orch_clone_testing::CloneTesting; diff --git a/interchain/modules-clone-testing/Cargo.toml b/interchain/modules-clone-testing/Cargo.toml index 5028ba62e0..cb33df6b08 100644 --- a/interchain/modules-clone-testing/Cargo.toml +++ b/interchain/modules-clone-testing/Cargo.toml @@ -41,7 +41,7 @@ abstract-money-market-adapter = { workspace = true, features = [ ] } # astroport = { version = "3.11.1" } # kujira = { version = "0.8" } -astrovault = { version = "0.1.4" } +astrovault = { version = "2.0.1" } serde = "1" serde_json = "1" diff --git a/interchain/scripts/src/bin/manual_deploy.rs b/interchain/scripts/src/bin/manual_deploy.rs index b7cdf317b9..2f350b8251 100644 --- a/interchain/scripts/src/bin/manual_deploy.rs +++ b/interchain/scripts/src/bin/manual_deploy.rs @@ -7,7 +7,6 @@ use clap::Parser; use cw_orch::{environment::NetworkInfoOwned, prelude::*}; use cw_orch_daemon::RUNTIME; use reqwest::Url; -use tokio::runtime::Runtime; use cw_orch::environment::ChainKind; use cw_orch_polytone::Polytone; diff --git a/modules/Cargo.toml b/modules/Cargo.toml index 232e132e71..5dd8d2e8ab 100644 --- a/modules/Cargo.toml +++ b/modules/Cargo.toml @@ -50,19 +50,21 @@ tokio = { version = "1.4", features = ["full"] } ## crates in order of publishing ## see docs/Publishing.md -abstract-adapter = { version = "0.25.0" } -abstract-app = { version = "0.25.0" } -abstract-client = { version = "0.25.0" } -abstract-interface = { version = "0.25.0" } -abstract-macros = { version = "0.25.0" } -abstract-standalone = { version = "0.25.0" } -abstract-testing = { version = "0.25.0" } +abstract-adapter = { version = "0.25.0" } +abstract-app = { version = "0.25.0" } +abstract-client = { version = "0.25.0" } +abstract-integration-tests = { version = "0.25.0" } +abstract-interface = { version = "0.25.0" } +abstract-macros = { version = "0.25.0" } +abstract-standalone = { version = "0.25.0" } +abstract-testing = { version = "0.25.0" } abstract-adapter-utils = { version = "0.25.0" } abstract-dex-standard = { version = "0.25.0" } abstract-money-market-standard = { version = "0.25.0" } abstract-staking-standard = { version = "0.25.0" } + # Integrations abstract-astroport-adapter = { path = "../integrations/astroport-adapter", default-features = false } abstract-astrovault-adapter = { path = "../integrations/astrovault-adapter", default-features = false } @@ -71,7 +73,7 @@ abstract-mars-adapter = { path = "../integrations/mars-adapter", default-f abstract-osmosis-adapter = { path = "../integrations/osmosis-adapter", default-features = false } abstract-wyndex-adapter = { path = "../integrations/wyndex-adapter", default-features = false } -# wyndex-bundle = { path = "../integrations/bundles/wyndex" } +mockdex-bundle = { path = "../integrations/bundles/mockdex" } ## Modules abstract-cw-staking = { path = "./contracts/adapters/cw-staking", default-features = false } @@ -91,6 +93,7 @@ abstract-adapter-utils = { path = "../framework/packages/standards/utils abstract-app = { path = "../framework/packages/abstract-app" } abstract-client = { path = "../framework/packages/abstract-client" } abstract-dex-standard = { path = "../framework/packages/standards/dex" } +abstract-integration-tests = { path = "../framework/packages/abstract-integration-tests" } abstract-interface = { path = "../framework/packages/abstract-interface" } abstract-macros = { path = "../framework/packages/abstract-macros" } abstract-money-market-standard = { path = "../framework/packages/standards/money-market" } diff --git a/modules/contracts/adapters/cw-staking/Cargo.toml b/modules/contracts/adapters/cw-staking/Cargo.toml index 002e4721c4..97b7dba769 100644 --- a/modules/contracts/adapters/cw-staking/Cargo.toml +++ b/modules/contracts/adapters/cw-staking/Cargo.toml @@ -97,7 +97,9 @@ cw20 = { workspace = true, optional = true } [dev-dependencies] abstract-adapter = { workspace = true, features = ["test-utils"] } +abstract-integration-tests = { workspace = true } anyhow = { workspace = true } +bip32 = { version = "0.5.2" } clap = { workspace = true } cw-orch = { workspace = true, features = ["daemon"] } cw-staking = { path = ".", package = "abstract-cw-staking", features = [ @@ -105,14 +107,16 @@ cw-staking = { path = ".", package = "abstract-cw-staking", features = [ "osmosis", "testing", ] } +cw20 = { workspace = true } +cw20-base = { workspace = true } dotenv = "0.15.0" env_logger = "0.11.3" log = "0.4.14" +mockdex-bundle = { workspace = true } semver = { version = "1.0" } +serde-cw-value = "0.7.0" tokio = { version = "1.4", features = ["full"] } -# wyndex-bundle = { workspace = true } -bip32 = { version = "0.5.2" } -cw20 = { workspace = true } -cw20-base = { workspace = true } -serde-cw-value = "0.7.0" +abstract-astrovault-adapter = { workspace = true, features = ["local"] } +abstract-kujira-adapter = { workspace = true, features = ["local"] } +abstract-wyndex-adapter = { workspace = true, features = ["local"] } diff --git a/modules/contracts/adapters/cw-staking/src/resolver.rs b/modules/contracts/adapters/cw-staking/src/resolver.rs index c2c9cd1714..c274cb24e0 100644 --- a/modules/contracts/adapters/cw-staking/src/resolver.rs +++ b/modules/contracts/adapters/cw-staking/src/resolver.rs @@ -11,16 +11,16 @@ use crate::contract::StakingResult; /// This provides superior UX in case of an IBC execution pub(crate) fn identify_provider(value: &str) -> Result, CwStakingError> { match value { + abstract_wyndex_adapter::WYNDEX => { + Ok(Box::::default()) + } // TODO: revive integrations - // abstract_wyndex_adapter::WYNDEX => { - // Ok(Box::::default()) - // } // abstract_astroport_adapter::ASTROPORT => { // Ok(Box::::default()) // } - // abstract_kujira_adapter::staking::BOW => { - // Ok(Box::::default()) - // } + abstract_kujira_adapter::staking::BOW => { + Ok(Box::::default()) + } abstract_osmosis_adapter::OSMOSIS => { Ok(Box::::default()) } diff --git a/modules/contracts/adapters/cw-staking/tests/common/mod.rs b/modules/contracts/adapters/cw-staking/tests/common/mod.rs deleted file mode 100644 index d53992ec99..0000000000 --- a/modules/contracts/adapters/cw-staking/tests/common/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub const ROOT_USER: &str = "root_user"; diff --git a/modules/contracts/adapters/cw-staking/tests/osmosis_stake.rs b/modules/contracts/adapters/cw-staking/tests/osmosis_stake.rs index ead96a9d6c..2a62ec2911 100644 --- a/modules/contracts/adapters/cw-staking/tests/osmosis_stake.rs +++ b/modules/contracts/adapters/cw-staking/tests/osmosis_stake.rs @@ -1,44 +1,26 @@ -#![allow(unused)] #![cfg(feature = "osmosis-test")] -mod common; - mod osmosis_test { - use std::path::PathBuf; - use std::rc::Rc; use abstract_adapter::abstract_interface::{ Abstract, AbstractInterfaceError, AccountI, AdapterDeployer, DeployStrategy, - RegisteredModule, }; - use abstract_adapter::objects::dependency::StaticDependency; use abstract_adapter::std::{ - adapter, ans_host::ExecuteMsgFns, - objects::{ - pool_id::PoolAddressBase, AccountId, AnsAsset, AssetEntry, PoolMetadata, PoolType, - }, + objects::{pool_id::PoolAddressBase, AnsAsset, AssetEntry, PoolMetadata, PoolType}, }; - use abstract_adapter::traits::{Dependencies, ModuleIdentification}; use abstract_client::GovernanceDetails; use abstract_cw_staking::interface::CwStakingAdapter; - use abstract_cw_staking::{ - contract::CONTRACT_VERSION, - msg::{ - ExecuteMsg, InstantiateMsg, QueryMsg, RewardTokensResponse, StakingAction, - StakingExecuteMsg, StakingQueryMsgFns, - }, - }; + use abstract_cw_staking::{contract::CONTRACT_VERSION, msg::StakingQueryMsgFns}; use abstract_staking_standard::{ msg::{StakingInfo, StakingInfoResponse}, CwStakingError, }; - use cosmwasm_std::{coin, coins, from_json, to_json_binary, Addr, Empty, Uint128}; + use cosmwasm_std::{coin, coins, from_json, to_json_binary, Empty, Uint128}; use cw_asset::AssetInfoBase; - use cw_orch_osmosis_test_tube::osmosis_test_tube::Account; use cw_orch_osmosis_test_tube::osmosis_test_tube::{ osmosis_std::{ - shim::{Duration, Timestamp}, + shim::Timestamp, types::osmosis::{ incentives::{MsgAddToGauge, MsgCreateGauge, QueryLockableDurationsRequest}, lockup::{ @@ -48,11 +30,11 @@ mod osmosis_test { poolincentives::v1beta1::QueryGaugeIdsRequest, }, }, - Module, OsmosisTestApp, Runner, + Module, Runner, }; use cw_orch_osmosis_test_tube::OsmosisTestTube; - use cw_orch::{interface, prelude::*}; + use cw_orch::prelude::*; const OSMOSIS: &str = "osmosis"; const DENOM: &str = "uosmo"; @@ -68,83 +50,6 @@ mod osmosis_test { format!("gamm/pool/{}", id) } - /// Stake using Abstract's OS (registered in daemon_state). - pub fn stake( - stake_assets: Vec, - provider: String, - duration: Option, - account: &AccountI, - ) -> Result<(), AbstractInterfaceError> { - let stake_msg = ExecuteMsg::Module(adapter::AdapterRequestMsg { - account_address: None, - request: StakingExecuteMsg { - provider, - action: StakingAction::Stake { - assets: stake_assets, - unbonding_period: duration, - }, - }, - }); - account.execute_on_module(CW_STAKING_ADAPTER_ID, stake_msg, vec![])?; - Ok(()) - } - - pub fn unstake( - stake_assets: Vec, - provider: String, - duration: Option, - account: &AccountI, - ) -> Result<(), AbstractInterfaceError> { - let stake_msg = ExecuteMsg::Module(adapter::AdapterRequestMsg { - account_address: None, - request: StakingExecuteMsg { - provider, - action: StakingAction::Unstake { - assets: stake_assets, - unbonding_period: duration, - }, - }, - }); - account.execute_on_module(CW_STAKING_ADAPTER_ID, stake_msg, vec![])?; - Ok(()) - } - - pub fn claim( - stake_assets: Vec, - provider: String, - account: &AccountI, - ) -> Result<(), AbstractInterfaceError> { - let claim_msg = ExecuteMsg::Module(adapter::AdapterRequestMsg { - account_address: None, - request: StakingExecuteMsg { - provider, - action: StakingAction::Claim { - assets: stake_assets, - }, - }, - }); - account.execute_on_module(CW_STAKING_ADAPTER_ID, claim_msg, vec![])?; - Ok(()) - } - - pub fn claim_rewards( - stake_assets: Vec, - provider: String, - account: &AccountI, - ) -> Result<(), AbstractInterfaceError> { - let claim_rewards_msg = ExecuteMsg::Module(adapter::AdapterRequestMsg { - account_address: None, - request: StakingExecuteMsg { - provider, - action: StakingAction::ClaimRewards { - assets: stake_assets, - }, - }, - }); - account.execute_on_module(CW_STAKING_ADAPTER_ID, claim_rewards_msg, vec![])?; - Ok(()) - } - fn setup_osmosis() -> anyhow::Result<( OsmosisTestTube, u64, @@ -152,7 +57,7 @@ mod osmosis_test { AccountI, )> { std::env::set_var("RUST_LOG", "debug"); - let _ = env_logger::try_init().unwrap(); + let _ = env_logger::try_init(); let tube = OsmosisTestTube::new(vec![ coin(1_000_000_000_000, ASSET_2), coin(1_000_000_000_000, ASSET_1), @@ -257,17 +162,12 @@ mod osmosis_test { tube.wait_seconds(10000)?; // query stake - let res = staking.staked( + staking.staked( OSMOSIS.into(), account_addr.to_string(), vec![AssetEntry::new(LP)], dur, - ); - - // TODO: something needs to be version bumped for it to work - // It's already supported on osmosis - // assert_that!(res.unwrap_err().to_string()) - // .contains(CwStakingError::NotImplemented("osmosis".to_owned()).to_string()); + )?; let staked_balance: AccountLockedCoinsResponse = tube.app.borrow().query( "/osmosis.lockup.Query/AccountLockedCoins", @@ -382,7 +282,6 @@ mod osmosis_test { #[test] fn concentrated_liquidity() -> anyhow::Result<()> { let (tube, _, staking, os) = setup_osmosis()?; - let account_addr = os.address()?; let lp = "osmosis/osmo2,atom2"; // transfer some LP tokens to the AccountI, as if it provided liquidity @@ -442,10 +341,9 @@ mod osmosis_test { #[test] fn reward_tokens_add_to_gauge() -> anyhow::Result<()> { - let (mut chain, pool_id, staking, os) = setup_osmosis()?; + let (mut chain, pool_id, staking, _account) = setup_osmosis()?; // For gauge chain.add_balance(&chain.sender_addr(), coins(1_000_000_000_000, ASSET_1))?; - let account_addr = os.address()?; let test_tube = chain.app.borrow(); let incentives = super::incentives::Incentives::new(&*test_tube); @@ -460,10 +358,10 @@ mod osmosis_test { let gauge_id_for_refill = gauge_ids.gauge_ids_with_duration[0].gauge_id; // Now incentivize pool - let time = test_tube.get_block_timestamp().plus_seconds(5); - let lockable_durations = + let _time = test_tube.get_block_timestamp().plus_seconds(5); + let _lockable_durations = incentives.query_lockable_durations(&QueryLockableDurationsRequest {})?; - let res = incentives.add_to_gauge( + incentives.add_to_gauge( MsgAddToGauge { owner: chain.sender_addr().to_string(), gauge_id: gauge_id_for_refill, @@ -474,7 +372,7 @@ mod osmosis_test { }, &chain.sender, )?; - chain.wait_seconds(10); + chain.wait_seconds(10)?; let res = staking.reward_tokens(OSMOSIS.to_owned(), vec![AssetEntry::new(LP)])?; assert_eq!(res.tokens, [[AssetInfoBase::Native(ASSET_1.to_owned())]]); @@ -484,14 +382,13 @@ mod osmosis_test { #[test] #[ignore = "Currently broken, see https://github.com/osmosis-labs/test-tube/pull/53"] fn reward_tokens_create_gauge() -> anyhow::Result<()> { - let (mut chain, pool_id, staking, os) = setup_osmosis()?; + let (mut chain, pool_id, staking, _account) = setup_osmosis()?; // For gauge chain.add_balance(&chain.sender_addr(), coins(1_000_000_000_000, ASSET_1))?; - let account_addr = os.address()?; let test_tube = chain.app.borrow(); let incentives = super::incentives::Incentives::new(&*test_tube); - let poolincentives = super::poolincentives::Poolincentives::new(&*test_tube); + let _poolincentives = super::poolincentives::Poolincentives::new(&*test_tube); // Check that we have empty assets at start let res = staking.reward_tokens(OSMOSIS.to_owned(), vec![AssetEntry::new(LP)])?; @@ -501,7 +398,7 @@ mod osmosis_test { let time = test_tube.get_block_timestamp().plus_seconds(5); let lockable_durations = incentives.query_lockable_durations(&QueryLockableDurationsRequest {})?; - let res = incentives.create_gauge( + incentives.create_gauge( MsgCreateGauge { pool_id, is_perpetual: true, @@ -524,7 +421,7 @@ mod osmosis_test { }, &chain.sender, )?; - chain.wait_seconds(10); + chain.wait_seconds(10)?; let res = staking.reward_tokens(OSMOSIS.to_owned(), vec![AssetEntry::new(LP)])?; assert_eq!( diff --git a/modules/contracts/adapters/cw-staking/tests/stake.rs b/modules/contracts/adapters/cw-staking/tests/stake.rs index 4a5134db28..0ab2e5c7f2 100644 --- a/modules/contracts/adapters/cw-staking/tests/stake.rs +++ b/modules/contracts/adapters/cw-staking/tests/stake.rs @@ -1,13 +1,9 @@ -#![cfg(feature = "TODO: replace wyndex_bundle")] -mod common; - -use abstract_adapter::abstract_interface::{ - Abstract, AbstractAccount, AdapterDeployer, DeployStrategy, -}; +use abstract_adapter::abstract_interface::{Abstract, AccountI, AdapterDeployer, DeployStrategy}; use abstract_adapter::std::{ adapter::BaseQueryMsgFns, objects::{module_version::ModuleDataResponse, AnsAsset, AssetEntry}, }; +use abstract_client::builder::cw20_builder::{ExecuteMsgInterfaceFns, QueryMsgInterfaceFns}; use abstract_cw_staking::{ contract::CONTRACT_VERSION, interface::CwStakingAdapter, msg::StakingQueryMsgFns, }; @@ -15,48 +11,45 @@ use abstract_staking_standard::msg::{ Claim, RewardTokensResponse, StakingInfo, StakingInfoResponse, UnbondingResponse, }; use cosmwasm_std::{coin, Uint128}; -use cw20::msg::Cw20ExecuteMsgFns; -use cw20_base::msg::QueryMsgFns; use cw_asset::AssetInfoBase; use cw_orch::prelude::*; -use wyndex_bundle::{EUR_USD_LP, WYNDEX as WYNDEX_WITHOUT_CHAIN, WYNDEX_OWNER, WYND_TOKEN}; +use mockdex_bundle::{EUR_USD_LP, WYNDEX as WYNDEX_WITHOUT_CHAIN, WYNDEX_OWNER, WYND_TOKEN}; const WYNDEX: &str = "cosmos-testnet>wyndex"; use abstract_cw_staking::CW_STAKING_ADAPTER_ID; -use common::create_default_account; +use abstract_integration_tests::create_default_account; fn setup_mock() -> anyhow::Result<( MockBech32, - wyndex_bundle::WynDex, + mockdex_bundle::WynDex, CwStakingAdapter, - AbstractAccount, + AccountI, )> { let chain = MockBech32::new("mock"); let sender = chain.sender_addr(); - let deployment = Abstract::deploy_on(chain.clone(), sender.to_string())?; - let wyndex = wyndex_bundle::WynDex::store_on(chain.clone())?; + let deployment = Abstract::deploy_on(chain.clone(), ())?; + let wyndex = mockdex_bundle::WynDex::store_on(chain.clone())?; - let _root_os = create_default_account(&deployment.account_factory)?; + let _root_os = create_default_account(&sender, &deployment)?; let staking = CwStakingAdapter::new(CW_STAKING_ADAPTER_ID, chain.clone()); staking.deploy(CONTRACT_VERSION.parse()?, Empty {}, DeployStrategy::Try)?; - let os = create_default_account(&deployment.account_factory)?; - let account_addr = os.account.address()?; - let _account_addr = os.account.address()?; + let account = create_default_account(&sender, &deployment)?; + let account_addr = account.address()?; - // transfer some LP tokens to the AbstractAccount, as if it provided liquidity + // transfer some LP tokens to the AccountI, as if it provided liquidity wyndex .eur_usd_lp .call_as(&chain.addr_make(WYNDEX_OWNER)) .transfer(1000u128, account_addr.to_string())?; - // install exchange on AbstractAccount - os.install_adapter(&staking, None)?; + // install exchange on AccountI + account.install_adapter(&staking, &[])?; - Ok((chain, wyndex, staking, os)) + Ok((chain, wyndex, staking, account)) } #[test] @@ -65,23 +58,29 @@ fn staking_inited() -> anyhow::Result<()> { // query staking info let staking_info = staking.info(WYNDEX.into(), vec![AssetEntry::new(EUR_USD_LP)])?; - assert_that!(staking_info).is_equal_to(StakingInfoResponse { - infos: vec![StakingInfo { - staking_target: wyndex.eur_usd_staking.into(), - staking_token: AssetInfoBase::Cw20(wyndex.eur_usd_lp.address()?), - unbonding_periods: Some(vec![ - cw_utils::Duration::Time(1), - cw_utils::Duration::Time(2), - ]), - max_claims: None, - }], - }); + assert_eq!( + staking_info, + StakingInfoResponse { + infos: vec![StakingInfo { + staking_target: wyndex.eur_usd_staking.into(), + staking_token: AssetInfoBase::Cw20(wyndex.eur_usd_lp.address()?), + unbonding_periods: Some(vec![ + cw_utils::Duration::Time(1), + cw_utils::Duration::Time(2), + ]), + max_claims: None, + }], + } + ); // query reward tokens let reward_tokens = staking.reward_tokens(WYNDEX.into(), vec![AssetEntry::new(EUR_USD_LP)])?; - assert_that!(reward_tokens).is_equal_to(RewardTokensResponse { - tokens: vec![vec![AssetInfoBase::Native(WYND_TOKEN.to_owned())]], - }); + assert_eq!( + reward_tokens, + RewardTokensResponse { + tokens: vec![vec![AssetInfoBase::Native(WYND_TOKEN.to_owned())]], + } + ); let module_data = staking.module_data()?; assert_eq!( @@ -98,13 +97,18 @@ fn staking_inited() -> anyhow::Result<()> { #[test] fn stake_lp() -> anyhow::Result<()> { - let (_, _, staking, os) = setup_mock()?; - let account_addr = os.account.address()?; + let (_, _, staking, account) = setup_mock()?; + let account_addr = account.address()?; let dur = Some(cw_utils::Duration::Time(2)); // stake 100 EUR - staking.stake(AnsAsset::new(EUR_USD_LP, 100u128), WYNDEX.into(), dur, &os)?; + staking.stake( + AnsAsset::new(EUR_USD_LP, 100u128), + WYNDEX.into(), + dur, + &account, + )?; // query stake let staked_balance = staking.staked( @@ -113,15 +117,15 @@ fn stake_lp() -> anyhow::Result<()> { vec![AssetEntry::new(EUR_USD_LP)], dur, )?; - assert_that!(staked_balance.amounts[0].u128()).is_equal_to(100u128); + assert_eq!(staked_balance.amounts[0].u128(), 100u128); Ok(()) } #[test] fn stake_lp_wthout_chain() -> anyhow::Result<()> { - let (_, _, staking, os) = setup_mock()?; - let account_addr = os.account.address()?; + let (_, _, staking, account) = setup_mock()?; + let account_addr = account.address()?; let dur = Some(cw_utils::Duration::Time(2)); @@ -130,7 +134,7 @@ fn stake_lp_wthout_chain() -> anyhow::Result<()> { AnsAsset::new(EUR_USD_LP, 100u128), WYNDEX_WITHOUT_CHAIN.into(), dur, - &os, + &account, )?; // query stake @@ -140,20 +144,25 @@ fn stake_lp_wthout_chain() -> anyhow::Result<()> { vec![AssetEntry::new(EUR_USD_LP)], dur, )?; - assert_that!(staked_balance.amounts[0].u128()).is_equal_to(100u128); + assert_eq!(staked_balance.amounts[0].u128(), 100u128); Ok(()) } #[test] fn unstake_lp() -> anyhow::Result<()> { - let (_, _, staking, os) = setup_mock()?; - let account_addr = os.account.address()?; + let (_, _, staking, account) = setup_mock()?; + let account_addr = account.address()?; let dur = Some(cw_utils::Duration::Time(2)); // stake 100 EUR - staking.stake(AnsAsset::new(EUR_USD_LP, 100u128), WYNDEX.into(), dur, &os)?; + staking.stake( + AnsAsset::new(EUR_USD_LP, 100u128), + WYNDEX.into(), + dur, + &account, + )?; // query stake let staked_balance = staking.staked( @@ -162,10 +171,15 @@ fn unstake_lp() -> anyhow::Result<()> { vec![AssetEntry::new(EUR_USD_LP)], dur, )?; - assert_that!(staked_balance.amounts[0].u128()).is_equal_to(100u128); + assert_eq!(staked_balance.amounts[0].u128(), 100u128); // now unbond 50 - staking.unstake(AnsAsset::new(EUR_USD_LP, 50u128), WYNDEX.into(), dur, &os)?; + staking.unstake( + AnsAsset::new(EUR_USD_LP, 50u128), + WYNDEX.into(), + dur, + &account, + )?; // query stake let staked_balance = staking.staked( WYNDEX.into(), @@ -173,14 +187,14 @@ fn unstake_lp() -> anyhow::Result<()> { vec![AssetEntry::new(EUR_USD_LP)], dur, )?; - assert_that!(staked_balance.amounts[0].u128()).is_equal_to(50u128); + assert_eq!(staked_balance.amounts[0].u128(), 50u128); Ok(()) } #[test] fn claim_unbonded_lp() -> anyhow::Result<()> { - let (chain, wyndex, staking, os) = setup_mock()?; - let account_addr = os.account.address()?; + let (chain, wyndex, staking, account) = setup_mock()?; + let account_addr = account.address()?; let dur = cw_utils::Duration::Time(2); @@ -189,7 +203,7 @@ fn claim_unbonded_lp() -> anyhow::Result<()> { AnsAsset::new(EUR_USD_LP, 100u128), WYNDEX.into(), Some(dur), - &os, + &account, )?; // now unbond 50 @@ -197,7 +211,7 @@ fn claim_unbonded_lp() -> anyhow::Result<()> { AnsAsset::new(EUR_USD_LP, 50u128), WYNDEX.into(), Some(dur), - &os, + &account, )?; let unstake_block_info = chain.block_info()?; @@ -209,35 +223,43 @@ fn claim_unbonded_lp() -> anyhow::Result<()> { vec![AssetEntry::new(EUR_USD_LP)], )?; let claimable_at = dur.after(&unstake_block_info); - assert_that!(unbonding_balance).is_equal_to(UnbondingResponse { - claims: vec![vec![Claim { - amount: Uint128::from(50u128), - claimable_at, - }]], - }); + assert_eq!( + unbonding_balance, + UnbondingResponse { + claims: vec![vec![Claim { + amount: Uint128::from(50u128), + claimable_at, + }]], + } + ); // forward 5 seconds chain.next_block()?; // now claim 50 - staking.claim(AssetEntry::new(EUR_USD_LP), WYNDEX.into(), &os)?; + staking.claim(AssetEntry::new(EUR_USD_LP), WYNDEX.into(), &account)?; // query balance let balance = wyndex.eur_usd_lp.balance(account_addr.to_string())?; - assert_that!(balance.balance.u128()).is_equal_to(950u128); + assert_eq!(balance.balance.u128(), 950u128); Ok(()) } #[test] fn claim_rewards() -> anyhow::Result<()> { - let (chain, mut wyndex, staking, os) = setup_mock()?; - let account_addr = os.account.address()?; + let (chain, mut wyndex, staking, account) = setup_mock()?; + let account_addr = account.address()?; let dur = Some(cw_utils::Duration::Time(2)); // stake 100 EUR - staking.stake(AnsAsset::new(EUR_USD_LP, 100u128), WYNDEX.into(), dur, &os)?; + staking.stake( + AnsAsset::new(EUR_USD_LP, 100u128), + WYNDEX.into(), + dur, + &account, + )?; // forward 500 seconds chain.wait_blocks(100)?; @@ -249,11 +271,11 @@ fn claim_rewards() -> anyhow::Result<()> { .unwrap(); // now claim rewards - staking.claim_rewards(AssetEntry::new(EUR_USD_LP), WYNDEX.into(), &os)?; + staking.claim_rewards(AssetEntry::new(EUR_USD_LP), WYNDEX.into(), &account)?; // query balance let balance = chain.query_balance(&account_addr, WYND_TOKEN)?; - assert_that!(balance.u128()).is_equal_to(10_000u128); + assert_eq!(balance.u128(), 10_000u128); Ok(()) } diff --git a/modules/contracts/adapters/dex/Cargo.toml b/modules/contracts/adapters/dex/Cargo.toml index 7e1153bf2f..47ea203d78 100644 --- a/modules/contracts/adapters/dex/Cargo.toml +++ b/modules/contracts/adapters/dex/Cargo.toml @@ -94,14 +94,15 @@ abstract-client = { workspace = true, optional = true } serde_json = { version = "1.0", optional = true } [dev-dependencies] -abstract-interface = { workspace = true, features = ["daemon"] } -anyhow = { workspace = true } -clap = { workspace = true } -dotenv = "0.15.0" -env_logger = "0.11.3" -semver = { workspace = true } -tokio = { workspace = true } -# wyndex-bundle = { workspace = true } +abstract-integration-tests = { workspace = true } +abstract-interface = { workspace = true, features = ["daemon"] } +anyhow = { workspace = true } +clap = { workspace = true } +dotenv = "0.15.0" +env_logger = "0.11.3" +mockdex-bundle = { workspace = true } +semver = { workspace = true } +tokio = { workspace = true } bip32 = { version = "0.5.2" } dex = { path = ".", features = [ @@ -115,3 +116,7 @@ dex = { path = ".", features = [ cw-utils = { workspace = true } cw20 = { workspace = true } cw20-base = { workspace = true } + +abstract-astrovault-adapter = { workspace = true, features = ["local"] } +abstract-kujira-adapter = { workspace = true, features = ["local"] } +abstract-wyndex-adapter = { workspace = true, features = ["local"] } diff --git a/modules/contracts/adapters/dex/src/exchanges/exchange_resolver.rs b/modules/contracts/adapters/dex/src/exchanges/exchange_resolver.rs index 4f88b49728..e4ef4c6801 100644 --- a/modules/contracts/adapters/dex/src/exchanges/exchange_resolver.rs +++ b/modules/contracts/adapters/dex/src/exchanges/exchange_resolver.rs @@ -9,15 +9,15 @@ use cosmwasm_std::Env; /// This provides superior UX in case of an IBC execution pub(crate) fn identify_exchange(value: &str) -> Result, DexError> { match value { - // abstract_wyndex_adapter::WYNDEX => { - // Ok(Box::::default()) - // } + abstract_wyndex_adapter::WYNDEX => { + Ok(Box::::default()) + } // abstract_astroport_adapter::ASTROPORT => { // Ok(Box::::default()) // } - // abstract_kujira_adapter::dex::FIN => { - // Ok(Box::::default()) - // } + abstract_kujira_adapter::dex::FIN => { + Ok(Box::::default()) + } abstract_osmosis_adapter::OSMOSIS => { Ok(Box::::default()) } diff --git a/modules/contracts/adapters/dex/tests/common/mod.rs b/modules/contracts/adapters/dex/tests/common/mod.rs deleted file mode 100644 index 69e1f4ae0c..0000000000 --- a/modules/contracts/adapters/dex/tests/common/mod.rs +++ /dev/null @@ -1,52 +0,0 @@ -use abstract_adapter::std::objects::gov_type::GovernanceDetails; -use abstract_interface::{AbstractAccount, AccountFactory}; -use cw_orch::{environment::Environment, prelude::*}; -pub fn create_default_account( - factory: &AccountFactory, -) -> anyhow::Result> { - let os = factory.create_default_account(GovernanceDetails::Monarchy { - monarch: Addr::unchecked(factory.environment().sender_addr()).to_string(), - })?; - Ok(os) -} - -// /// Instantiates the dex adapter and registers it with the registry -// #[allow(dead_code)] -// pub fn init_dex_adapter( -// chain: Mock, -// deployment: &Abstract, -// version: Option, -// ) -> anyhow::Result> { -// let mut dex_adapter = DexAdapter::new(EXCHANGE, chain); -// dex_adapter -// .as_instance_mut() -// .set_mock(Box::new(boot_core::ContractWrapper::new_with_empty( -// ::dex::contract::execute, -// ::dex::contract::instantiate, -// ::dex::contract::query, -// ))); -// dex_adapter.upload()?; -// dex_adapter.instantiate( -// &InstantiateMsg::{ -// app: DexInstantiateMsg{ -// swap_fee: Decimal::percent(1), -// recipient_os: 0, -// }, -// base: abstract_adapter::std::adapter::BaseInstantiateMsg { -// ans_host_address: deployment.ans_host.addr_str()?, -// registry_address: deployment.registry.addr_str()?, -// }, -// }, -// None, -// None, -// )?; - -// let version: Version = version -// .unwrap_or_else(|| deployment.version.to_string()) -// .parse()?; - -// deployment -// .registry -// .register_adapters(vec![dex_adapter.as_instance()], &version)?; -// Ok(dex_adapter) -// } diff --git a/modules/contracts/adapters/dex/tests/osmosis.rs b/modules/contracts/adapters/dex/tests/osmosis.rs index dcce8d301f..eaaee1662e 100644 --- a/modules/contracts/adapters/dex/tests/osmosis.rs +++ b/modules/contracts/adapters/dex/tests/osmosis.rs @@ -1,6 +1,6 @@ #![cfg(feature = "osmosis-test")] -use std::{format, rc::Rc}; +use std::format; use abstract_adapter::std::{ ans_host::ExecuteMsgFns, @@ -23,7 +23,7 @@ use anyhow::Result as AnyResult; use cosmwasm_std::{coin, coins, Decimal, Uint128}; use cw_asset::AssetBase; use cw_orch::prelude::*; -use cw_orch_osmosis_test_tube::{osmosis_test_tube::Account, OsmosisTestTube}; +use cw_orch_osmosis_test_tube::OsmosisTestTube; /// Provide liquidity using Abstract's OS (registered in daemon_state). pub fn provide( diff --git a/modules/contracts/adapters/dex/tests/raw.rs b/modules/contracts/adapters/dex/tests/raw.rs index 826f21e9b1..9a20b2c455 100644 --- a/modules/contracts/adapters/dex/tests/raw.rs +++ b/modules/contracts/adapters/dex/tests/raw.rs @@ -1,41 +1,37 @@ -#![cfg(feature = "TODO: replace wyndex_bundle")] - use abstract_adapter::std::{ adapter::AdapterRequestMsg, ans_host::QueryMsgFns as _, objects::{PoolAddress, ABSTRACT_ACCOUNT_ID}, }; -use abstract_dex_adapter::{contract::CONTRACT_VERSION, msg::DexInstantiateMsg, DEX_ADAPTER_ID}; -use abstract_dex_standard::msg::DexExecuteMsg; -use abstract_interface::{AdapterDeployer, DeployStrategy}; -use cw20::msg::Cw20ExecuteMsgFns as _; -use cw20_base::msg::QueryMsgFns as _; -use cw_asset::{AssetBase, AssetInfoBase}; -mod common; +use abstract_client::builder::cw20_builder::{ExecuteMsgInterfaceFns, QueryMsgInterfaceFns}; use abstract_dex_adapter::interface::DexAdapter; +use abstract_dex_adapter::{contract::CONTRACT_VERSION, msg::DexInstantiateMsg, DEX_ADAPTER_ID}; use abstract_dex_standard::action::DexAction; -use abstract_interface::{Abstract, AbstractAccount}; -use common::create_default_account; +use abstract_dex_standard::msg::DexExecuteMsg; +use abstract_integration_tests::create_default_account; +use abstract_interface::Abstract; +use abstract_interface::{AccountI, AdapterDeployer, DeployStrategy}; use cosmwasm_std::{coin, Decimal}; +use cw_asset::{AssetBase, AssetInfoBase}; use cw_orch::prelude::*; -use wyndex_bundle::{EUR, USD, WYNDEX as WYNDEX_WITHOUT_CHAIN, WYNDEX_OWNER}; +use mockdex_bundle::{EUR, USD, WYNDEX as WYNDEX_WITHOUT_CHAIN, WYNDEX_OWNER}; const WYNDEX: &str = "cosmos-testnet>wyndex"; #[allow(clippy::type_complexity)] fn setup_mock() -> anyhow::Result<( MockBech32, - wyndex_bundle::WynDex, + mockdex_bundle::WynDex, DexAdapter, - AbstractAccount, + AccountI, Abstract, )> { let chain = MockBech32::new("mock"); let sender = chain.sender_addr(); - let deployment = Abstract::deploy_on(chain.clone(), sender.to_string())?; - let wyndex = wyndex_bundle::WynDex::deploy_on(chain.clone(), Empty {})?; + let deployment = Abstract::deploy_on(chain.clone(), ())?; + let wyndex = mockdex_bundle::WynDex::deploy_on(chain.clone(), Empty {})?; - let _root_os = create_default_account(&deployment.account_factory)?; + let _root_os = create_default_account(&sender, &deployment)?; let dex_adapter = DexAdapter::new(DEX_ADAPTER_ID, chain.clone()); dex_adapter.deploy( @@ -47,20 +43,20 @@ fn setup_mock() -> anyhow::Result<( DeployStrategy::Try, )?; - let account = create_default_account(&deployment.account_factory)?; + let account = create_default_account(&sender, &deployment)?; // mint to account chain.set_balance(&account.address()?, vec![coin(10_000, EUR)])?; // install exchange on OS - account.install_adapter(&dex_adapter, None)?; + account.install_adapter(&dex_adapter, &[])?; Ok((chain, wyndex, dex_adapter, account, deployment)) } #[test] fn raw_swap_native() -> anyhow::Result<()> { - let (chain, wyndex, dex_adapter, os, abstr) = setup_mock()?; - let account_addr = os.account.address()?; + let (chain, wyndex, dex_adapter, account, abstr) = setup_mock()?; + let account_addr = account.address()?; let pools = abstr.ans_host.pool_list(None, None, None)?; println!("{:?}", pools); @@ -70,40 +66,38 @@ fn raw_swap_native() -> anyhow::Result<()> { (EUR, 100), USD, WYNDEX.into(), - &os, + &account, PoolAddress::contract(wyndex.eur_usd_pair).into(), )?; // check balances let eur_balance = chain.query_balance(&account_addr, EUR)?; - assert_that!(eur_balance.u128()).is_equal_to(9_900); + assert_eq!(eur_balance.u128(), 9_900); let usd_balance = chain.query_balance(&account_addr, USD)?; - assert_that!(usd_balance.u128()).is_equal_to(98); + assert_eq!(usd_balance.u128(), 98); - // assert that OS 0 received the swap fee - let os0_account = AbstractAccount::new(&abstr, ABSTRACT_ACCOUNT_ID) - .account - .address()?; + // assert that account 0 received the swap fee + let os0_account = AccountI::load_from(&abstr, ABSTRACT_ACCOUNT_ID)?.address()?; let os0_eur_balance = chain.query_balance(&os0_account, EUR)?; - assert_that!(os0_eur_balance.u128()).is_equal_to(1); + assert_eq!(os0_eur_balance.u128(), 1); Ok(()) } #[test] fn raw_swap_native_without_chain() -> anyhow::Result<()> { - let (chain, wyndex, dex_adapter, os, abstr) = setup_mock()?; - let account_addr = os.account.address()?; + let (chain, wyndex, dex_adapter, account, abstr) = setup_mock()?; + let account_addr = account.address()?; // swap 100 EUR to USD dex_adapter.raw_swap_native( (EUR, 100), USD, WYNDEX_WITHOUT_CHAIN.into(), - &os, + &account, PoolAddress::contract(wyndex.eur_usd_pair).into(), )?; @@ -111,25 +105,23 @@ fn raw_swap_native_without_chain() -> anyhow::Result<()> { let balances = chain.query_all_balances(&account_addr)?; println!("{:?}", balances); let eur_balance = chain.query_balance(&account_addr, EUR)?; - assert_that!(eur_balance.u128()).is_equal_to(9_900); + assert_eq!(eur_balance.u128(), 9_900); let usd_balance = chain.query_balance(&account_addr, USD)?; - assert_that!(usd_balance.u128()).is_equal_to(98); + assert_eq!(usd_balance.u128(), 98); - // assert that OS 0 received the swap fee - let os0_account = AbstractAccount::new(&abstr, ABSTRACT_ACCOUNT_ID) - .account - .address()?; - let os0_eur_balance = chain.query_balance(&os0_account, EUR)?; - assert_that!(os0_eur_balance.u128()).is_equal_to(1); + // assert that Account 0 received the swap fee + let account = AccountI::load_from(&abstr, ABSTRACT_ACCOUNT_ID)?.address()?; + let eur_balance = chain.query_balance(&account, EUR)?; + assert_eq!(eur_balance.u128(), 1); Ok(()) } #[test] fn raw_swap_raw() -> anyhow::Result<()> { - let (chain, wyndex, _, os, abstr) = setup_mock()?; - let account_addr = os.account.address()?; + let (chain, wyndex, _, account, abstr) = setup_mock()?; + let account_addr = account.address()?; // transfer raw let owner = chain.addr_make(WYNDEX_OWNER); @@ -152,21 +144,19 @@ fn raw_swap_raw() -> anyhow::Result<()> { }, }, }); - os.account.execute_on_module(DEX_ADAPTER_ID, swap_msg)?; + account.execute_on_module(DEX_ADAPTER_ID, swap_msg, vec![])?; // check balances let raw_balance = wyndex.raw_token.balance(account_addr.to_string())?; - assert_that!(raw_balance.balance.u128()).is_equal_to(9_900); + assert_eq!(raw_balance.balance.u128(), 9_900); let eur_balance = chain.query_balance(&account_addr, EUR)?; - assert_that!(eur_balance.u128()).is_equal_to(10098); + assert_eq!(eur_balance.u128(), 10098); // assert that OS 0 received the swap fee - let account0_account = AbstractAccount::new(&abstr, ABSTRACT_ACCOUNT_ID) - .account - .address()?; + let account0_account = AccountI::load_from(&abstr, ABSTRACT_ACCOUNT_ID)?.address()?; let os0_raw_balance = wyndex.raw_token.balance(account0_account.to_string())?; - assert_that!(os0_raw_balance.balance.u128()).is_equal_to(1); + assert_eq!(os0_raw_balance.balance.u128(), 1); Ok(()) } diff --git a/modules/contracts/adapters/dex/tests/swap.rs b/modules/contracts/adapters/dex/tests/swap.rs index 318e2f915a..bbdcfc82bf 100644 --- a/modules/contracts/adapters/dex/tests/swap.rs +++ b/modules/contracts/adapters/dex/tests/swap.rs @@ -1,36 +1,32 @@ -#![cfg(feature = "TODO: replace wyndex_bundle")] - use abstract_adapter::std::{ans_host::QueryMsgFns as _, objects::ABSTRACT_ACCOUNT_ID}; +use abstract_client::builder::cw20_builder::{ExecuteMsgInterfaceFns, QueryMsgInterfaceFns}; use abstract_dex_adapter::{contract::CONTRACT_VERSION, msg::DexInstantiateMsg, DEX_ADAPTER_ID}; use abstract_dex_standard::{msg::DexFeesResponse, DexError}; -use abstract_interface::{AbstractInterfaceError, AdapterDeployer, DeployStrategy}; -use cw20::msg::Cw20ExecuteMsgFns as _; -use cw20_base::msg::QueryMsgFns as _; -mod common; +use abstract_interface::{AbstractInterfaceError, AccountI, AdapterDeployer, DeployStrategy}; use abstract_dex_adapter::interface::DexAdapter; -use abstract_interface::{Abstract, AbstractAccount}; -use common::create_default_account; +use abstract_integration_tests::create_default_account; +use abstract_interface::Abstract; use cosmwasm_std::{coin, Decimal}; use cw_orch::prelude::*; -use wyndex_bundle::{EUR, RAW_TOKEN, USD, WYNDEX as WYNDEX_WITHOUT_CHAIN, WYNDEX_OWNER}; +use mockdex_bundle::{EUR, RAW_TOKEN, USD, WYNDEX as WYNDEX_WITHOUT_CHAIN, WYNDEX_OWNER}; const WYNDEX: &str = "cosmos-testnet>wyndex"; #[allow(clippy::type_complexity)] fn setup_mock() -> anyhow::Result<( MockBech32, - wyndex_bundle::WynDex, + mockdex_bundle::WynDex, DexAdapter, - AbstractAccount, + AccountI, Abstract, )> { let chain = MockBech32::new("mock"); let sender = chain.sender_addr(); - let deployment = Abstract::deploy_on(chain.clone(), sender.to_string())?; - let wyndex = wyndex_bundle::WynDex::deploy_on(chain.clone(), Empty {})?; + let deployment = Abstract::deploy_on(chain.clone(), ())?; + let wyndex = mockdex_bundle::WynDex::deploy_on(chain.clone(), Empty {})?; - let _root_os = create_default_account(&deployment.account_factory)?; + let _root_os = create_default_account(&sender, &deployment)?; let dex_adapter = DexAdapter::new(DEX_ADAPTER_ID, chain.clone()); dex_adapter.deploy( @@ -42,81 +38,77 @@ fn setup_mock() -> anyhow::Result<( DeployStrategy::Try, )?; - let account = create_default_account(&deployment.account_factory)?; + let account = create_default_account(&sender, &deployment)?; // mint to account chain.set_balance(&account.address()?, vec![coin(10_000, EUR)])?; // install exchange on OS - account.install_adapter(&dex_adapter, None)?; + account.install_adapter(&dex_adapter, &[])?; Ok((chain, wyndex, dex_adapter, account, deployment)) } #[test] fn swap_native() -> anyhow::Result<()> { - let (chain, _, dex_adapter, os, abstr) = setup_mock()?; - let account_addr = os.account.address()?; + let (chain, _, dex_adapter, account, abstr) = setup_mock()?; + let account_addr = account.address()?; let pools = abstr.ans_host.pool_list(None, None, None)?; println!("{:?}", pools); // swap 100 EUR to USD - dex_adapter.ans_swap((EUR, 100), USD, WYNDEX.into(), &os, &abstr.ans_host)?; + dex_adapter.ans_swap((EUR, 100), USD, WYNDEX.into(), &account, &abstr.ans_host)?; // check balances let eur_balance = chain.query_balance(&account_addr, EUR)?; - assert_that!(eur_balance.u128()).is_equal_to(9_900); + assert_eq!(eur_balance.u128(), 9_900); let usd_balance = chain.query_balance(&account_addr, USD)?; - assert_that!(usd_balance.u128()).is_equal_to(98); + assert_eq!(usd_balance.u128(), 98); // assert that OS 0 received the swap fee - let os0_account = AbstractAccount::new(&abstr, ABSTRACT_ACCOUNT_ID) - .account - .address()?; + let os0_account = AccountI::load_from(&abstr, ABSTRACT_ACCOUNT_ID)?.address()?; let os0_eur_balance = chain.query_balance(&os0_account, EUR)?; - assert_that!(os0_eur_balance.u128()).is_equal_to(1); + assert_eq!(os0_eur_balance.u128(), 1); Ok(()) } #[test] fn swap_native_without_chain() -> anyhow::Result<()> { - let (chain, _, dex_adapter, os, abstr) = setup_mock()?; - let account_addr = os.account.address()?; + let (chain, _, dex_adapter, account, abstr) = setup_mock()?; + let account_addr = account.address()?; // swap 100 EUR to USD dex_adapter.ans_swap( (EUR, 100), USD, WYNDEX_WITHOUT_CHAIN.into(), - &os, + &account, &abstr.ans_host, )?; // check balances let eur_balance = chain.query_balance(&account_addr, EUR)?; - assert_that!(eur_balance.u128()).is_equal_to(9_900); + assert_eq!(eur_balance.u128(), 9_900); let usd_balance = chain.query_balance(&account_addr, USD)?; - assert_that!(usd_balance.u128()).is_equal_to(98); + assert_eq!(usd_balance.u128(), 98); // assert that OS 0 received the swap fee - let os0_account = AbstractAccount::new(&abstr, ABSTRACT_ACCOUNT_ID) - .account - .address()?; + let os0_account = AccountI::load_from(&abstr, ABSTRACT_ACCOUNT_ID)?.address()?; let os0_eur_balance = chain.query_balance(&os0_account, EUR)?; - assert_that!(os0_eur_balance.u128()).is_equal_to(1); + assert_eq!(os0_eur_balance.u128(), 1); Ok(()) } #[test] fn swap_raw() -> anyhow::Result<()> { - let (chain, wyndex, dex_adapter, os, abstr) = setup_mock()?; - let account_addr = os.account.address()?; + let (chain, wyndex, dex_adapter, account, abstr) = setup_mock()?; + let account_addr = account.address()?; // transfer raw let owner = chain.addr_make(WYNDEX_OWNER); @@ -126,21 +118,25 @@ fn swap_raw() -> anyhow::Result<()> { .transfer(10_000u128, account_addr.to_string())?; // swap 100 RAW to EUR - dex_adapter.ans_swap((RAW_TOKEN, 100), EUR, WYNDEX.into(), &os, &abstr.ans_host)?; + dex_adapter.ans_swap( + (RAW_TOKEN, 100), + EUR, + WYNDEX.into(), + &account, + &abstr.ans_host, + )?; // check balances let raw_balance = wyndex.raw_token.balance(account_addr.to_string())?; - assert_that!(raw_balance.balance.u128()).is_equal_to(9_900); + assert_eq!(raw_balance.balance.u128(), 9_900); let eur_balance = chain.query_balance(&account_addr, EUR)?; - assert_that!(eur_balance.u128()).is_equal_to(10098); + assert_eq!(eur_balance.u128(), 10098); // assert that OS 0 received the swap fee - let account0_account = AbstractAccount::new(&abstr, ABSTRACT_ACCOUNT_ID) - .account - .address()?; + let account0_account = AccountI::load_from(&abstr, ABSTRACT_ACCOUNT_ID)?.address()?; let os0_raw_balance = wyndex.raw_token.balance(account0_account.to_string())?; - assert_that!(os0_raw_balance.balance.u128()).is_equal_to(1); + assert_eq!(os0_raw_balance.balance.u128(), 1); Ok(()) } @@ -148,9 +144,7 @@ fn swap_raw() -> anyhow::Result<()> { #[test] fn get_fees() -> anyhow::Result<()> { let (_, _, dex_adapter, _, abstr) = setup_mock()?; - let account0_account = AbstractAccount::new(&abstr, ABSTRACT_ACCOUNT_ID) - .account - .address()?; + let account0_account = AccountI::load_from(&abstr, ABSTRACT_ACCOUNT_ID)?.address()?; use abstract_dex_adapter::msg::DexQueryMsgFns as _; @@ -163,11 +157,11 @@ fn get_fees() -> anyhow::Result<()> { #[test] fn authorized_update_fee() -> anyhow::Result<()> { let (_, _, dex_adapter, _, abstr) = setup_mock()?; - let account0 = AbstractAccount::new(&abstr, ABSTRACT_ACCOUNT_ID); + let account0 = AccountI::load_from(&abstr, ABSTRACT_ACCOUNT_ID)?; let update_fee_msg = abstract_dex_standard::msg::ExecuteMsg::Module( abstract_adapter::std::adapter::AdapterRequestMsg { - account_address: Some(account0.account.addr_str()?), + account_address: Some(account0.addr_str()?), request: abstract_dex_standard::msg::DexExecuteMsg::UpdateFee { swap_fee: Some(Decimal::percent(5)), recipient_account: None, @@ -175,7 +169,7 @@ fn authorized_update_fee() -> anyhow::Result<()> { }, ); - dex_adapter.execute(&update_fee_msg, None)?; + dex_adapter.execute(&update_fee_msg, &[])?; use abstract_dex_adapter::msg::DexQueryMsgFns as _; @@ -199,8 +193,7 @@ fn unauthorized_update_fee() -> anyhow::Result<()> { ); let err = account - .account - .execute_on_module(DEX_ADAPTER_ID, update_fee_msg) + .execute_on_module(DEX_ADAPTER_ID, update_fee_msg, vec![]) .unwrap_err(); let AbstractInterfaceError::Orch(orch_error) = err else { panic!("unexpected error type"); diff --git a/modules/contracts/adapters/money-market/Cargo.toml b/modules/contracts/adapters/money-market/Cargo.toml index 485da375b3..2311fb5d87 100644 --- a/modules/contracts/adapters/money-market/Cargo.toml +++ b/modules/contracts/adapters/money-market/Cargo.toml @@ -67,19 +67,19 @@ abstract-kujira-adapter = { workspace = true } abstract-client = { workspace = true, optional = true } [dev-dependencies] -abstract-interface = { workspace = true, features = ["daemon"] } -anyhow = { workspace = true } -clap = { workspace = true } -dotenv = "0.15.0" -env_logger = "0.11.3" -semver = { workspace = true } -tokio = { workspace = true } -# wyndex-bundle = { workspace = true } abstract-adapter = { workspace = true, features = ["test-utils"] } +abstract-interface = { workspace = true, features = ["daemon"] } +anyhow = { workspace = true } +clap = { workspace = true } +dotenv = "0.15.0" +env_logger = "0.11.3" +mockdex-bundle = { workspace = true } money-market = { path = ".", features = [ # "mars", # "ghost", ], package = "abstract-money-market-adapter" } +semver = { workspace = true } +tokio = { workspace = true } # abstract-wyndex-adapter = { workspace = true, features = ["local"] } diff --git a/modules/contracts/apps/payment/Cargo.toml b/modules/contracts/apps/payment/Cargo.toml index 695a860d69..6985eb37a2 100644 --- a/modules/contracts/apps/payment/Cargo.toml +++ b/modules/contracts/apps/payment/Cargo.toml @@ -41,20 +41,21 @@ cw-orch = { workspace = true } # Dependencies for interface [dev-dependencies] -abstract-app = { workspace = true, features = ["test-utils"] } -abstract-interface = { workspace = true, features = ["daemon"] } -clap.workspace = true -cw-orch = { workspace = true, features = ["daemon"] } -dotenv = "0.15.0" -env_logger = "0.11.3" -semver = "1.0" +abstract-app = { workspace = true, features = ["test-utils"] } +abstract-integration-tests = { workspace = true } +abstract-interface = { workspace = true, features = ["daemon"] } +clap.workspace = true +cw-orch = { workspace = true, features = ["daemon"] } +dotenv = "0.15.0" +env_logger = "0.11.3" +semver = "1.0" cw-plus-orch = { workspace = true } cw20 = { workspace = true } cw20-base = { workspace = true } -# wyndex-bundle = { workspace = true } abstract-dex-adapter = { workspace = true, features = [ # "wynd", "testing", ] } +mockdex-bundle = { workspace = true } diff --git a/modules/contracts/apps/payment/tests/integration.rs b/modules/contracts/apps/payment/tests/integration.rs index c60f89030b..9db041b1f6 100644 --- a/modules/contracts/apps/payment/tests/integration.rs +++ b/modules/contracts/apps/payment/tests/integration.rs @@ -1,21 +1,24 @@ -#![cfg(feature = "TODO: replace wyndex_bundle")] - use abstract_app::sdk::cw_helpers::Clearable; use abstract_app::std::{ ans_host::ExecuteMsgFns, - objects::{gov_type::GovernanceDetails, AccountId, AnsAsset, AssetEntry}, + objects::{AccountId, AnsAsset, AssetEntry}, }; use abstract_dex_adapter::{contract::CONTRACT_VERSION, msg::DexInstantiateMsg}; use abstract_interface::{ - Abstract, AbstractAccount, AdapterDeployer, AppDeployer, DeployStrategy, RegistryExecFns, + Abstract, AccountExecFns, AccountI, AdapterDeployer, AppDeployer, DeployStrategy, + RegistryExecFns, }; use cosmwasm_std::{coin, coins, to_json_binary, Decimal, Uint128}; -use cw20::{msg::Cw20ExecuteMsgFns, Cw20Coin}; -use cw20_base::msg::{InstantiateMsg as Cw20InstantiateMsg, QueryMsgFns}; +use cw20::Cw20Coin; +use cw20_base::msg::InstantiateMsg as Cw20InstantiateMsg; use cw_orch::environment::Environment; // Use prelude to get all the necessary imports +use abstract_integration_tests::create_default_account; use cw_orch::{anyhow, prelude::*}; -use cw_plus_orch::cw20_base::Cw20Base as AbstractCw20Base; +use cw_plus_orch::cw20_base::{ + Cw20Base as AbstractCw20Base, ExecuteMsgInterfaceFns as _, QueryMsgInterfaceFns as _, +}; +use mockdex_bundle::WynDex; use payment_app::{ contract::{APP_ID, APP_VERSION}, msg::{ @@ -24,10 +27,9 @@ use payment_app::{ }, *, }; -use wyndex_bundle::WynDex; type PaymentTestSetup = ( - AbstractAccount, + AccountI, Abstract, PaymentAppInterface, WynDex, @@ -36,7 +38,7 @@ type PaymentTestSetup = ( fn setup(mock: MockBech32, desired_asset: Option) -> anyhow::Result { let app = PaymentAppInterface::new(APP_ID, mock.clone()); - let abstr_deployment = Abstract::deploy_on(mock.clone(), mock.sender_addr().to_string())?; + let abstr_deployment = Abstract::deploy_on(mock.clone(), ())?; let dex_adapter = abstract_dex_adapter::interface::DexAdapter::new( abstract_dex_adapter::DEX_ADAPTER_ID, @@ -52,12 +54,7 @@ fn setup(mock: MockBech32, desired_asset: Option) -> anyhow::Result< )?; // Create a new account to install the app onto - let account = - abstr_deployment - .account_factory - .create_default_account(GovernanceDetails::Monarchy { - monarch: mock.sender_addr().to_string(), - })?; + let account = create_default_account(&mock.sender_addr(), &abstr_deployment)?; // claim the namespace so app can be deployed abstr_deployment @@ -67,7 +64,7 @@ fn setup(mock: MockBech32, desired_asset: Option) -> anyhow::Result< app.deploy(APP_VERSION.parse()?, DeployStrategy::Try)?; // install exchange module as it's a dependency - account.install_adapter(&dex_adapter, None)?; + account.install_adapter(&dex_adapter, &[])?; let wyndex = WynDex::store_on(mock)?; @@ -76,12 +73,12 @@ fn setup(mock: MockBech32, desired_asset: Option) -> anyhow::Result< &AppInstantiateMsg { desired_asset, denom_asset: "Dollah".to_owned(), - exchanges: vec![wyndex_bundle::WYNDEX.to_owned()], + exchanges: vec![mockdex_bundle::WYNDEX.to_owned()], }, - None, + &[], )?; - account.account.update_adapter_authorized_addresses( + account.update_adapter_authorized_addresses( abstract_dex_adapter::DEX_ADAPTER_ID, vec![app.address()?.to_string()], vec![], @@ -113,11 +110,11 @@ fn successful_install() -> anyhow::Result<()> { #[test] fn test_update_config() -> anyhow::Result<()> { // Create the mock - let mock = MockBech32::new("sender"); + let mock = MockBech32::new("mock"); // Set up the environment and contract let (account, abstr, app, wyndex) = - setup(mock.clone(), Some(AssetEntry::new(wyndex_bundle::USD)))?; + setup(mock.clone(), Some(AssetEntry::new(mockdex_bundle::USD)))?; let new_target_currency = wyndex.eur_token.to_string(); @@ -127,17 +124,22 @@ fn test_update_config() -> anyhow::Result<()> { .ans_host .update_dexes(vec![dex_name.clone()], vec![])?; - app.call_as(&account.address()?).update_config( - Some("Ye-uh-roah".to_owned()), - Clearable::new_opt(AssetEntry::new(&new_target_currency)), - Some(vec![dex_name.clone()]), + account.admin_execute_on_module( + app.id(), + to_json_binary(&payment_app::msg::ExecuteMsg::Module( + msg::AppExecuteMsg::UpdateConfig { + denom_asset: Some("Ye-uh-roah".to_owned()), + desired_asset: Clearable::new_opt(AssetEntry::new(&new_target_currency)), + exchanges: Some(vec![dex_name.clone()]), + }, + ))?, )?; let config = app.config()?; assert_eq!( config, ConfigResponse { - desired_asset: Some(AssetEntry::new(wyndex_bundle::EUR)), + desired_asset: Some(AssetEntry::new(mockdex_bundle::EUR)), denom_asset: "Ye-uh-roah".to_owned(), exchanges: vec![dex_name] } @@ -177,7 +179,7 @@ fn test_simple_tip() -> anyhow::Result<()> { let expected_tipper = TipperResponse { address: tipper.clone(), tip_count: 1, - total_amounts: vec![AnsAsset::new(wyndex_bundle::EUR, Uint128::new(100))], + total_amounts: vec![AnsAsset::new(mockdex_bundle::EUR, Uint128::new(100))], }; assert_eq!(expected_tipper, tipper_response); @@ -200,7 +202,7 @@ fn test_simple_tip() -> anyhow::Result<()> { assert_eq!( tipper_response.total_amounts, vec![AnsAsset::new( - AssetEntry::new(wyndex_bundle::EUR), + AssetEntry::new(mockdex_bundle::EUR), Uint128::new(tip_amount) )] ); @@ -215,7 +217,7 @@ fn test_simple_tip() -> anyhow::Result<()> { assert_eq!( tipper_response.total_amounts, vec![AnsAsset::new( - AssetEntry::new(wyndex_bundle::EUR), + AssetEntry::new(mockdex_bundle::EUR), Uint128::zero() )] ); @@ -228,7 +230,7 @@ fn test_tip_swap() -> anyhow::Result<()> { let mock = MockBech32::new("sender"); let (account, _abstr_deployment, app, wyndex) = - setup(mock.clone(), Some(AssetEntry::new(wyndex_bundle::USD)))?; + setup(mock.clone(), Some(AssetEntry::new(mockdex_bundle::USD)))?; let WynDex { eur_token, @@ -279,7 +281,7 @@ fn test_tip_swap_and_not_swap() -> anyhow::Result<()> { let mock = MockBech32::new("sender"); let (account, abstr_deployment, app, wyndex) = - setup(mock.clone(), Some(AssetEntry::new(wyndex_bundle::USD)))?; + setup(mock.clone(), Some(AssetEntry::new(mockdex_bundle::USD)))?; let WynDex { eur_token, @@ -333,7 +335,7 @@ fn test_cw20_tip() -> anyhow::Result<()> { let mock = MockBech32::new("sender"); let (account, abstr_deployment, app, _wyndex) = - setup(mock.clone(), Some(AssetEntry::new(wyndex_bundle::USD)))?; + setup(mock.clone(), Some(AssetEntry::new(mockdex_bundle::USD)))?; let tipper = mock.addr_make("tipper"); let tip_amount = 100u128; @@ -356,7 +358,7 @@ fn test_cw20_tip() -> anyhow::Result<()> { marketing: None, }, None, - None, + &[], )?; // We add the currency cw20 to the abstract deployment @@ -443,7 +445,7 @@ fn test_multiple_tippers() -> anyhow::Result<()> { let expected_tipper = TipperResponse { address: tipper1.clone(), tip_count: 1, - total_amounts: vec![AnsAsset::new(wyndex_bundle::EUR, Uint128::new(100))], + total_amounts: vec![AnsAsset::new(mockdex_bundle::EUR, Uint128::new(100))], }; assert_eq!(expected_tipper, tipper_response1); @@ -452,7 +454,7 @@ fn test_multiple_tippers() -> anyhow::Result<()> { let expected_tipper = TipperResponse { address: tipper2.clone(), tip_count: 1, - total_amounts: vec![AnsAsset::new(wyndex_bundle::EUR, Uint128::new(200))], + total_amounts: vec![AnsAsset::new(mockdex_bundle::EUR, Uint128::new(200))], }; assert_eq!(expected_tipper, tipper_response2); @@ -482,7 +484,7 @@ fn test_sent_desired_asset() -> anyhow::Result<()> { let mock = MockBech32::new("sender"); let (_, abstr_deployment, app, wyndex) = - setup(mock, Some(AssetEntry::new(wyndex_bundle::USD)))?; + setup(mock, Some(AssetEntry::new(mockdex_bundle::USD)))?; let mock: MockBech32 = abstr_deployment.ans_host.environment().clone(); let WynDex { usd_token, .. } = wyndex; @@ -499,7 +501,7 @@ fn test_sent_desired_asset() -> anyhow::Result<()> { let expected_tipper = TipperResponse { address: tipper.clone(), tip_count: 1, - total_amounts: vec![AnsAsset::new(wyndex_bundle::USD, Uint128::new(100))], + total_amounts: vec![AnsAsset::new(mockdex_bundle::USD, Uint128::new(100))], }; assert_eq!(expected_tipper, tipper_response); diff --git a/modules/contracts/standalones/ica-owner/Cargo.toml b/modules/contracts/standalones/ica-owner/Cargo.toml index 5b549e9021..983d343d88 100644 --- a/modules/contracts/standalones/ica-owner/Cargo.toml +++ b/modules/contracts/standalones/ica-owner/Cargo.toml @@ -59,6 +59,5 @@ abstract-client = { workspace = true } abstract-standalone = { workspace = true, features = ["test-utils"] } cw-orch = { workspace = true, features = ["daemon"] } cw-orch-interchain = { workspace = true, features = ["daemon"] } -cw-orch-starship = { version = "0.4.1" } env_logger = { version = "0.11.3" } my-standalone = { path = "." } diff --git a/modules/contracts/standalones/ica-owner/src/bin/publish.rs b/modules/contracts/standalones/ica-owner/src/bin/publish.rs index 2b58cd5bf3..e266f0145f 100644 --- a/modules/contracts/standalones/ica-owner/src/bin/publish.rs +++ b/modules/contracts/standalones/ica-owner/src/bin/publish.rs @@ -12,7 +12,7 @@ use my_standalone::MY_STANDALONE_ID; use abstract_client::{AbstractClient, Publisher}; use abstract_standalone::objects::namespace::Namespace; use clap::Parser; -use cw_orch::{anyhow, daemon::networks::parse_network, prelude::*, tokio::runtime::Runtime}; +use cw_orch::{anyhow, daemon::networks::parse_network, prelude::*}; use my_standalone::MyStandaloneInterface; fn publish(networks: Vec) -> anyhow::Result<()> {