Skip to content

Commit bd9768c

Browse files
committed
Reactivation of adapters
1 parent 317a04a commit bd9768c

File tree

27 files changed

+330
-466
lines changed

27 files changed

+330
-466
lines changed

integrations/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
members = [
33
# "astroport-adapter",
44
"astrovault-adapter",
5-
# "bundles/*",
5+
"bundles/*",
66
"osmosis-adapter",
77
"wyndex-adapter",
88
"kujira-adapter",

integrations/bundles/mockdex/Cargo.toml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,25 @@ version = { workspace = true }
88

99

1010
[dependencies]
11-
cw-controllers = "2.0.0"
12-
wyndex = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" }
13-
wyndex-factory = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" }
14-
wyndex-multi-hop = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" }
15-
wyndex-pair = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" }
16-
wyndex-stake = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" }
11+
cw-controllers = "2.0.0"
12+
# wyndex = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" }
13+
# wyndex-factory = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" }
14+
# wyndex-multi-hop = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" }
15+
# wyndex-pair = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" }
16+
# wyndex-stake = { git = "https://github.com/cosmorama/wynddex.git", tag = "v1.1.2" }
17+
wyndex = { git = "https://github.com/abstractsdk/wynddex", rev = "cbe316f17c4a89d0c3938ea66747a5ff1fc5a5e9" }
18+
wyndex-factory = { git = "https://github.com/abstractsdk/wynddex", rev = "cbe316f17c4a89d0c3938ea66747a5ff1fc5a5e9" }
19+
wyndex-multi-hop = { git = "https://github.com/abstractsdk/wynddex", rev = "cbe316f17c4a89d0c3938ea66747a5ff1fc5a5e9" }
20+
wyndex-pair = { git = "https://github.com/abstractsdk/wynddex", rev = "cbe316f17c4a89d0c3938ea66747a5ff1fc5a5e9" }
21+
wyndex-stake = { git = "https://github.com/abstractsdk/wynddex", rev = "cbe316f17c4a89d0c3938ea66747a5ff1fc5a5e9" }
1722

18-
abstract-interface = { workspace = true, features = ["testing"] }
19-
abstract-std = { workspace = true }
20-
anyhow = { workspace = true }
21-
cosmwasm-schema = { workspace = true }
22-
cosmwasm-std = { workspace = true }
23-
cw-asset = { workspace = true }
24-
cw-orch = { workspace = true }
25-
cw-plus-interface.workspace = true
26-
cw-plus-orch = "0.25.0"
27-
cw20 = { workspace = true }
28-
cw20-base = { workspace = true }
23+
abstract-interface = { workspace = true, features = ["testing"] }
24+
abstract-std = { workspace = true }
25+
anyhow = { workspace = true }
26+
cosmwasm-schema = { workspace = true }
27+
cosmwasm-std = { workspace = true }
28+
cw-asset = { workspace = true }
29+
cw-orch = { workspace = true }
30+
cw-plus-orch = { workspace = true }
31+
cw20 = { workspace = true }
32+
cw20-base = { workspace = true }

integrations/bundles/mockdex/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use abstract_std::{
1313
use cosmwasm_std::{coin, Decimal, Uint128};
1414
use cw20::Cw20Coin;
1515
use cw_orch::prelude::*;
16-
use cw_plus_interface::cw20_base::Cw20Base as AbstractCw20Base;
16+
use cw_plus_orch::cw20_base::Cw20Base as AbstractCw20Base;
1717
use wyndex::{
1818
asset::{AssetInfo, AssetInfoExt},
1919
factory::{DefaultStakeConfig, PartialStakeConfig},
@@ -164,6 +164,7 @@ impl Deploy<MockBech32> for WynDex {
164164
min_bond: Uint128::new(1),
165165
unbonding_periods: vec![1, 2],
166166
max_distributions: 1,
167+
converter: None,
167168
})
168169
.build(&chain);
169170

@@ -443,11 +444,6 @@ impl Deploy<MockBech32> for WynDex {
443444
Box::new(&mut self.raw_eur_lp),
444445
]
445446
}
446-
447-
// This is only a mock deploy
448-
fn deployed_state_file_path() -> Option<String> {
449-
None
450-
}
451447
}
452448
impl WynDex {
453449
/// registers the WynDex contracts and assets on Abstract

integrations/bundles/mockdex/src/suite.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ impl SuiteBuilder {
111111
min_bond: Uint128::new(1000),
112112
unbonding_periods: vec![60 * 60 * 24 * 7, 60 * 60 * 24 * 14, 60 * 60 * 24 * 21],
113113
max_distributions: 6,
114+
converter: None,
114115
},
115116
trading_starts: None,
116117
}

integrations/bundles/mockdex/tests/abstract.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
mod abstrct {
22
use abstract_interface::Abstract;
33
use cw_orch::prelude::*;
4-
use wyndex_bundle::WynDex;
4+
use mockdex_bundle::WynDex;
55

66
#[test]
77
fn deploy() {
88
let mock = MockBech32::new("mock");
9-
let owner = mock.sender_addr();
109

11-
Abstract::deploy_on(mock.clone(), owner.to_string()).unwrap();
10+
Abstract::deploy_on(mock.clone(), ()).unwrap();
1211

1312
let deployed = WynDex::deploy_on(mock.clone(), Empty {}).unwrap();
1413
let loaded = WynDex::load_from(mock).unwrap();

integrations/bundles/mockdex/tests/staking.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ use cosmwasm_std::{coin, from_json, Addr, Decimal, Uint128};
22
use wyndex::{
33
asset::{AssetInfo, AssetInfoExt},
44
factory::PartialStakeConfig,
5+
stake::ReceiveMsg,
56
};
67
use wyndex_stake::{
7-
msg::{QueryMsg as StakeQueryMsg, ReceiveDelegationMsg, StakedResponse},
8+
msg::{QueryMsg as StakeQueryMsg, StakedResponse},
89
state::Config as WyndexStakeConfig,
910
};
1011

1112
mod staking {
1213
use super::*;
1314
use cw_orch::mock::MockBech32;
1415
use cw_orch::prelude::TxHandler;
16+
use mockdex_bundle::{suite::SuiteBuilder, WYNDEX_OWNER};
1517
use wyndex::factory::{DefaultStakeConfig, DistributionFlow};
16-
use wyndex_bundle::{suite::SuiteBuilder, WYNDEX_OWNER};
1718

1819
#[test]
1920
fn basic() {
@@ -40,6 +41,7 @@ mod staking {
4041
min_bond: Uint128::new(1),
4142
unbonding_periods: vec![1, 2],
4243
max_distributions: 1,
44+
converter: None,
4345
})
4446
.build(&mock);
4547

@@ -92,7 +94,7 @@ mod staking {
9294
&pair_info.liquidity_token,
9395
1000,
9496
&pair_info.staking_addr,
95-
ReceiveDelegationMsg::Delegate {
97+
ReceiveMsg::Delegate {
9698
unbonding_period: 1,
9799
delegate_as: None,
98100
},
@@ -190,6 +192,7 @@ mod staking {
190192
min_bond: Uint128::new(1),
191193
unbonding_periods: vec![1],
192194
max_distributions: 3,
195+
converter: None,
193196
})
194197
.build(&mock);
195198

integrations/bundles/mockdex/tests/swap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use cosmwasm_std::{coin, testing::mock_env};
22
use cw_orch::mock::MockBech32;
33
use cw_orch::prelude::TxHandler;
4+
use mockdex_bundle::suite::SuiteBuilder;
45
use wyndex::asset::{AssetInfo, AssetInfoExt};
5-
use wyndex_bundle::suite::SuiteBuilder;
66
use wyndex_multi_hop::msg::SwapOperation;
77

88
#[test]

interchain/framework-clone-testing/tests/upgrade-account.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
use abstract_framework_clone_testing::common;
55
use abstract_interface::{Abstract, AccountDetails, AccountI, AccountQueryFns, RegistryQueryFns};
66
use abstract_std::objects::AccountId;
7-
use abstract_testing::TEST_VERSION;
87
use anyhow::bail;
98
use cw_orch::{daemon::networks::PION_1, prelude::*};
109
use cw_orch_clone_testing::CloneTesting;

interchain/modules-clone-testing/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ abstract-money-market-adapter = { workspace = true, features = [
4141
] }
4242
# astroport = { version = "3.11.1" }
4343
# kujira = { version = "0.8" }
44-
astrovault = { version = "0.1.4" }
44+
astrovault = { version = "2.0.1" }
4545

4646
serde = "1"
4747
serde_json = "1"

interchain/scripts/src/bin/manual_deploy.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use clap::Parser;
77
use cw_orch::{environment::NetworkInfoOwned, prelude::*};
88
use cw_orch_daemon::RUNTIME;
99
use reqwest::Url;
10-
use tokio::runtime::Runtime;
1110

1211
use cw_orch::environment::ChainKind;
1312
use cw_orch_polytone::Polytone;

modules/Cargo.toml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,21 @@ tokio = { version = "1.4", features = ["full"] }
5050

5151
## crates in order of publishing ## see docs/Publishing.md
5252

53-
abstract-adapter = { version = "0.25.0" }
54-
abstract-app = { version = "0.25.0" }
55-
abstract-client = { version = "0.25.0" }
56-
abstract-interface = { version = "0.25.0" }
57-
abstract-macros = { version = "0.25.0" }
58-
abstract-standalone = { version = "0.25.0" }
59-
abstract-testing = { version = "0.25.0" }
53+
abstract-adapter = { version = "0.25.0" }
54+
abstract-app = { version = "0.25.0" }
55+
abstract-client = { version = "0.25.0" }
56+
abstract-integration-tests = { version = "0.25.0" }
57+
abstract-interface = { version = "0.25.0" }
58+
abstract-macros = { version = "0.25.0" }
59+
abstract-standalone = { version = "0.25.0" }
60+
abstract-testing = { version = "0.25.0" }
6061

6162
abstract-adapter-utils = { version = "0.25.0" }
6263
abstract-dex-standard = { version = "0.25.0" }
6364
abstract-money-market-standard = { version = "0.25.0" }
6465
abstract-staking-standard = { version = "0.25.0" }
6566

67+
6668
# Integrations
6769
abstract-astroport-adapter = { path = "../integrations/astroport-adapter", default-features = false }
6870
abstract-astrovault-adapter = { path = "../integrations/astrovault-adapter", default-features = false }
@@ -71,7 +73,7 @@ abstract-mars-adapter = { path = "../integrations/mars-adapter", default-f
7173
abstract-osmosis-adapter = { path = "../integrations/osmosis-adapter", default-features = false }
7274
abstract-wyndex-adapter = { path = "../integrations/wyndex-adapter", default-features = false }
7375

74-
# wyndex-bundle = { path = "../integrations/bundles/wyndex" }
76+
mockdex-bundle = { path = "../integrations/bundles/mockdex" }
7577

7678
## Modules
7779
abstract-cw-staking = { path = "./contracts/adapters/cw-staking", default-features = false }
@@ -91,6 +93,7 @@ abstract-adapter-utils = { path = "../framework/packages/standards/utils
9193
abstract-app = { path = "../framework/packages/abstract-app" }
9294
abstract-client = { path = "../framework/packages/abstract-client" }
9395
abstract-dex-standard = { path = "../framework/packages/standards/dex" }
96+
abstract-integration-tests = { path = "../framework/packages/abstract-integration-tests" }
9497
abstract-interface = { path = "../framework/packages/abstract-interface" }
9598
abstract-macros = { path = "../framework/packages/abstract-macros" }
9699
abstract-money-market-standard = { path = "../framework/packages/standards/money-market" }

modules/contracts/adapters/cw-staking/Cargo.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,22 +97,26 @@ cw20 = { workspace = true, optional = true }
9797

9898
[dev-dependencies]
9999
abstract-adapter = { workspace = true, features = ["test-utils"] }
100+
abstract-integration-tests = { workspace = true }
100101
anyhow = { workspace = true }
102+
bip32 = { version = "0.5.2" }
101103
clap = { workspace = true }
102104
cw-orch = { workspace = true, features = ["daemon"] }
103105
cw-staking = { path = ".", package = "abstract-cw-staking", features = [
104106
# "wynd",
105107
"osmosis",
106108
"testing",
107109
] }
110+
cw20 = { workspace = true }
111+
cw20-base = { workspace = true }
108112
dotenv = "0.15.0"
109113
env_logger = "0.11.3"
110114
log = "0.4.14"
115+
mockdex-bundle = { workspace = true }
111116
semver = { version = "1.0" }
117+
serde-cw-value = "0.7.0"
112118
tokio = { version = "1.4", features = ["full"] }
113-
# wyndex-bundle = { workspace = true }
114-
bip32 = { version = "0.5.2" }
115-
cw20 = { workspace = true }
116-
cw20-base = { workspace = true }
117119

118-
serde-cw-value = "0.7.0"
120+
abstract-astrovault-adapter = { workspace = true, features = ["local"] }
121+
abstract-kujira-adapter = { workspace = true, features = ["local"] }
122+
abstract-wyndex-adapter = { workspace = true, features = ["local"] }

modules/contracts/adapters/cw-staking/src/resolver.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ use crate::contract::StakingResult;
1111
/// This provides superior UX in case of an IBC execution
1212
pub(crate) fn identify_provider(value: &str) -> Result<Box<dyn Identify>, CwStakingError> {
1313
match value {
14+
abstract_wyndex_adapter::WYNDEX => {
15+
Ok(Box::<abstract_wyndex_adapter::staking::WynDex>::default())
16+
}
1417
// TODO: revive integrations
15-
// abstract_wyndex_adapter::WYNDEX => {
16-
// Ok(Box::<abstract_wyndex_adapter::staking::WynDex>::default())
17-
// }
1818
// abstract_astroport_adapter::ASTROPORT => {
1919
// Ok(Box::<abstract_astroport_adapter::staking::Astroport>::default())
2020
// }
21-
// abstract_kujira_adapter::staking::BOW => {
22-
// Ok(Box::<abstract_kujira_adapter::staking::Bow>::default())
23-
// }
21+
abstract_kujira_adapter::staking::BOW => {
22+
Ok(Box::<abstract_kujira_adapter::staking::Bow>::default())
23+
}
2424
abstract_osmosis_adapter::OSMOSIS => {
2525
Ok(Box::<abstract_osmosis_adapter::staking::Osmosis>::default())
2626
}

modules/contracts/adapters/cw-staking/tests/common/mod.rs

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)