Skip to content

Commit

Permalink
Update optimizer (#88)
Browse files Browse the repository at this point in the history
* bump optimizer and update featured compilation.

* formatting

* updated tomls

* update abstract wasm image

* update resolver

* formatting

* remove test runs on beta toolchain

---------

Co-authored-by: Buckram <[email protected]>
  • Loading branch information
CyberHoward and Buckram123 authored Oct 12, 2023
1 parent db46799 commit f44c68e
Show file tree
Hide file tree
Showing 49 changed files with 140 additions and 90 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/framework-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ env:
jobs:
required:
runs-on: ubuntu-latest
name: ubuntu / ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: [stable, beta]
name: ubuntu / stable
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -30,10 +27,10 @@ jobs:
uses: mozilla-actions/[email protected]
with:
version: "v0.4.2"
- name: Install ${{ matrix.toolchain }}
- name: Install stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
toolchain: stable
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
working-directory: ./framework
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/modules-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ env:
jobs:
required:
runs-on: ubuntu-latest
name: ubuntu / ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: [stable, beta]
name: ubuntu / stable
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -29,10 +26,10 @@ jobs:
uses: mozilla-actions/[email protected]
with:
version: "v0.4.2"
- name: Install ${{ matrix.toolchain }}
- name: Install stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
toolchain: stable
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
working-directory: ./modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
abstractmoney/workspace-optimizer:0.14
abstractmoney/workspace-optimizer:0.15
tar -zcvf cosmwasm-artifacts.tar.gz artifacts
- name: Create Release
uses: softprops/action-gh-release@v1
Expand Down
Binary file added app-template/artifacts/app.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion app-template/artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fd0a2c3713d9b714e278c5a10932960857fafcc560baf9661ea9eb8142ff90a8 app.wasm
910e1fb423546a122d71aa44426f2e893861d6e92e4edc4986f585cc2ee06421 app.wasm
1 change: 1 addition & 0 deletions app-template/artifacts/checksums_intermediate.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8a5d026af836bdaeea0bff0166ce06889e4d1e536d5f55ddfb80fe2816cf88c2 /target/wasm32-unknown-unknown/release/app.wasm
2 changes: 1 addition & 1 deletion framework/.github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
abstractmoney/workspace-optimizer:0.14
abstractmoney/workspace-optimizer:0.15
tar -zcvf cosmwasm-artifacts.tar.gz artifacts
- name: Create Release
uses: softprops/action-gh-release@v1
Expand Down
Binary file modified framework/artifacts/abstract_account_factory.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_ans_host.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_ibc_client.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_manager.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_module_factory.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_proxy.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_version_control.wasm
Binary file not shown.
14 changes: 7 additions & 7 deletions framework/artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
59d944ebe90ad87e17225bb1c769e0625c93ba8f94b2a7117fbe8e740ed6f070 abstract_account_factory.wasm
c6d7b78fde01e530b6c1f6cddd1a27d7aea52cc93719cb372f33df6050c2de28 abstract_ans_host.wasm
ffe258ac2c8a7e4cb398ba15ffa18a4d40b97434b529129cf644c674783046b5 abstract_ibc_client.wasm
3388417565a9c5ea0c137f04f9837c2c4c5c044260622874f9f82240ead54dd2 abstract_manager.wasm
341af958d791b466ab4c25e184e07918666d11d9ff6347f2cb0384b25849b6b8 abstract_module_factory.wasm
2b816cdbe5637494185495001e58d6b27b1ad52e4074006eaa9a591c37f6527a abstract_proxy.wasm
be606904c0693735f6e602c909ba6200b4e2f03cbb9fefff59b897a9d39c38bf abstract_version_control.wasm
65924727b463026a236b53c36aa7b7a57900ba807e6e1944000ab0069566ee8e abstract_account_factory.wasm
bedd49508c49df55a9da241ebe5ea5fbb16c10bd536ffd7deadd6672f7665391 abstract_ans_host.wasm
8494e1e03ee9a44787daff66fa46fe7f5fe88cdabf259cc7176e537b5b90e73e abstract_ibc_client.wasm
76ecd9ccc433f5013369363e4b197d1affff6777d81477bd3bc053a8f7836925 abstract_manager.wasm
ab73244a6f116506bcd51b895fec31099941fcc027f2114f4548e7bd20658726 abstract_module_factory.wasm
5bdc231d56fbb542ba22bc83d9fa3957184d416e7559b58f227b6e5293c8333d abstract_proxy.wasm
7549408943d03133340494ab3a5eda76c199c1ddc9729bf49bd8497cbfeaef3e abstract_version_control.wasm
14 changes: 7 additions & 7 deletions framework/artifacts/checksums_intermediate.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
6c90aa4319cd88e8a340f3cb4381e572f21ec7dbdbf190066fc831cda46d37cb target/wasm32-unknown-unknown/release/abstract_account_factory.wasm
a65fa8e11aa0e1d6db839edb23622fe6dc04b574dfae2452a6748b0619376f6f target/wasm32-unknown-unknown/release/abstract_ans_host.wasm
e6ae10f7bea00208516b1f48a764f7cd736cf8df3214779d4a1560f7663149d8 target/wasm32-unknown-unknown/release/abstract_ibc_client.wasm
4f6773f5027c6b7d7e651af8930745a98027aee76caaef33eb2e071764934af2 target/wasm32-unknown-unknown/release/abstract_manager.wasm
6a199aaf77b937e473d815e80c5eba60df8d23ce98c07d0c878ad5846ccbb450 target/wasm32-unknown-unknown/release/abstract_module_factory.wasm
fc9aacf22deda7c1e7163503d96e93447ff2c3b5a528262f575426781aba660c target/wasm32-unknown-unknown/release/abstract_proxy.wasm
311309cc0716a0a5783744e1d880e66c35dc15650b57d525670e7ac933a5f57f target/wasm32-unknown-unknown/release/abstract_version_control.wasm
75762d153d1509ba21d0e391670acc0f7a61267d407f25be130ab5dc8946e712 target/wasm32-unknown-unknown/release/abstract_account_factory.wasm
2006e754a80b57c1d3c73d918a16ac42d065ed1d11e2594bafd15fe97bff477d target/wasm32-unknown-unknown/release/abstract_ans_host.wasm
8c59c2017b50b5eccb9082e1569a8449d373c25939fa0fda4ab2f30bbe71b7de target/wasm32-unknown-unknown/release/abstract_ibc_client.wasm
c32a0496065dc2b233f34f5a0d676f3cb2ca15afa9f1c2af4d6fe6eae45fb357 target/wasm32-unknown-unknown/release/abstract_manager.wasm
cbdc593d9bfe811f7567cedd24f8e7add4169acba52e7d95dc40a8b7ae0ccb25 target/wasm32-unknown-unknown/release/abstract_module_factory.wasm
e28e44c0483deb873aae8571fa7479c85af8698d4efe5d3376adf98ca59acc16 target/wasm32-unknown-unknown/release/abstract_proxy.wasm
4df86f06eb33974a01300c6cff1807c0f9947cbaafc3e24b0f509cb73d2dc58e target/wasm32-unknown-unknown/release/abstract_version_control.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking-juno.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking-kujira.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking-neutron.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking-osmosis.wasm
Binary file not shown.
Binary file added modules/artifacts/abstract_cw_staking-sei.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking-terra2.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking.wasm
Binary file not shown.
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter-juno.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter-kujira.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter-neutron.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter-osmosis.wasm
Binary file not shown.
Binary file added modules/artifacts/abstract_dex_adapter-sei.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter-terra2.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_tendermint_staking_adapter.wasm
Binary file not shown.
Binary file modified modules/artifacts/challenge_app.wasm
Binary file not shown.
38 changes: 21 additions & 17 deletions modules/artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
6a760d6ee97dfc2f68679564af91cda0a50016c7737b4537d33df580a201bfea abstract_cw_staking-juno.wasm
9f8849a2ff2b206b3a7424e687e69155599504c0f1118e1037961c37424fb815 abstract_cw_staking-kujira.wasm
9f1e42ac3b2d498e108aec11655cb8a6e4d1e24f449903fb13dae15267a3cc28 abstract_cw_staking-neutron.wasm
359464a666e0f95a7f68a272760a0635fa40ddc4a20c33fff98e8d3eff88b5a2 abstract_cw_staking-osmosis.wasm
7d924a841ee19ec69e3a2a64d20f0a9bce6c91a98b41ce0f8c172225e27ebd6f abstract_cw_staking-terra2.wasm
64c7c144f66847ed9df91f86250e78152c767ff18d1bfd9ac1cd04713704387f abstract_cw_staking.wasm
4f99c67f61df831fe595852332588361e937cc706eb65fc73bf24c34990f3c97 abstract_dex_adapter-juno.wasm
4db6b0f8b80a060cc9859ec9f32cb4706670dc1ba0c5ffc63458a1df3f2b3254 abstract_dex_adapter-kujira.wasm
e34f04b9609734bcf19d68a0937d591992b07f12c06738e55759380ac8625f14 abstract_dex_adapter-neutron.wasm
9f6a95333770395a33efb836646cb0a427aafe76a87251a63a5a17f93f231871 abstract_dex_adapter-osmosis.wasm
677ca8db7eb3ce1692f0d4aca4e63274297889b96be31df9193e06b1c712e742 abstract_dex_adapter-terra2.wasm
797c183e21e0aa5bbd6be525c726a1b9f1833ef0dce84d238c2ab8c4ba9b75eb abstract_dex_adapter.wasm
bf7fb21b2e48d1f2c5948756c14c59772c6f70a37203aee115c1bd59e63ddfae abstract_tendermint_staking_adapter.wasm
3cfc0783d4c06e59f5ea975c153fe2d813441452bc4d511b7fa69a23528cda95 challenge_app.wasm
d9daf324d3ceffe44e14fa40f191c239459e5a1b8d0a0b27646cef8bda78ac3a croncat_app.wasm
83809777669d5f9c9408c893e276417c041725f90e12801f775f2bf9bffb3dfc dca_app.wasm
2ce3d083c304ff8a6ee50a8d0557ab6e9214ec89959a8139159e087ca0e7d83a etf_app.wasm
41c950d76dc493afa8a9a61d390394fbb5fb8e4743e390acf4d2ba61750e5698 abstract_challenge_app.wasm
228f374726756f852805385834abf45f5ad41c0298bda75a0b936a1bdb095c75 abstract_cw_staking-injective.wasm
cf225a6721a5e59b38a93aef6c32cf5a35d48b97ac450ca0776cdac523d4fc58 abstract_cw_staking-juno.wasm
9163f5c3324028531b9b4240291e4129080d3fb3ac090ed6b95d8d5781d2b766 abstract_cw_staking-kujira.wasm
228f374726756f852805385834abf45f5ad41c0298bda75a0b936a1bdb095c75 abstract_cw_staking-neutron.wasm
d0c473f53bade9a10b31156cde6306f730ea10e795db1c0cc3bd7d82e144d0a6 abstract_cw_staking-osmosis.wasm
228f374726756f852805385834abf45f5ad41c0298bda75a0b936a1bdb095c75 abstract_cw_staking-sei.wasm
228f374726756f852805385834abf45f5ad41c0298bda75a0b936a1bdb095c75 abstract_cw_staking-terra.wasm
4f46d89bd2439481baad01f4d9edc18cfc6fe617c0d733fe4301816e311f4992 abstract_cw_staking.wasm
8f34d816a48634795ab467097a0b58fa5239091705c7dc5cc9e81b4da4e3d56c abstract_dca_app.wasm
79a828de7f4ee2818ba24232073847f5cdaac7a815440623c78a196586510969 abstract_dex_adapter-injective.wasm
271c8c730c15c66e619aef219c01cb831024222ba9e9e321211adda8478deee0 abstract_dex_adapter-juno.wasm
f6de450553bc665a3a06032e8e2190b5dd53b80d1a48f500506f441e6c00564a abstract_dex_adapter-kujira.wasm
79a828de7f4ee2818ba24232073847f5cdaac7a815440623c78a196586510969 abstract_dex_adapter-neutron.wasm
d93ac1f4118f5a9f9f9bb25d4ae5b437c0ee86ff80944f334c47637a168d5a63 abstract_dex_adapter-osmosis.wasm
79a828de7f4ee2818ba24232073847f5cdaac7a815440623c78a196586510969 abstract_dex_adapter-sei.wasm
2603ce7ddfbb3d79df5a13be33fde5c9f1fc636198475d113020dc398f8fdf3d abstract_dex_adapter-terra.wasm
4f73cbd4b45d32b8d9cc99adebf353bfefa7d27b8275845876e2fccf9adc86f9 abstract_dex_adapter.wasm
ed58270bc090648f8345a4dc55addddab1fe565ee6ac734af4cf40743d49a5a2 abstract_etf.wasm
4ee5194bd418b9d7a3016f77fabcb7997ef29127905c7c407d9e8c4d8b71c20a abstract_tendermint_staking_adapter.wasm
5af7e086e0530e7b49198b592494d6b1277e2f624cb8abdfdb0b3d11d7b46bcf croncat_app.wasm
14 changes: 7 additions & 7 deletions modules/artifacts/checksums_intermediate.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
51698f9e324ca1fb519bed33e4113766d7c55c4a805b350b5eb2368fa41ada08 target/wasm32-unknown-unknown/release/abstract_cw_staking.wasm
53594e2aef32f5d44ace1cb5dd19f32458be8c4467fdbd55ef05d92b075eb76f target/wasm32-unknown-unknown/release/abstract_dex_adapter.wasm
78641cb53e66dd6edf080ebf5a09668fe7defd8a2d5cbb958aa4ad64c4ea29d9 target/wasm32-unknown-unknown/release/abstract_tendermint_staking_adapter.wasm
4e31173c1e5ac68626c675c2a2180cd571611467b036b50bbb8ceacfb7e38026 target/wasm32-unknown-unknown/release/challenge_app.wasm
7db929d9c58b065c48a6e1285c462e3b9e0c2f52e81dce89cfe786c2b4541bc5 target/wasm32-unknown-unknown/release/croncat_app.wasm
c9bdbed8a1bbdac9ed372ef7a4d9538968e8baf52ec8f92c3fab427410e0e645 target/wasm32-unknown-unknown/release/dca_app.wasm
5255c6f13478a4e9692599fa3deb7414430edbc3bf00416f70288b577aa8fffd target/wasm32-unknown-unknown/release/etf_app.wasm
9f078d44c8328a3c771303ef9f948ed55c82bcccd971387628f8a0d0a40ac6a9 target/wasm32-unknown-unknown/release/abstract_challenge_app.wasm
a17772261e46f4c0e141ce2da300580f981546c12358280eedcd2df18b0e8e5a target/wasm32-unknown-unknown/release/abstract_cw_staking.wasm
61192f905142c86c91fd94284168cd33e47168abcf4e52807bced90a5a05a301 target/wasm32-unknown-unknown/release/abstract_dca_app.wasm
ad6de3ee2d413ecdedf8e1b4913344588e5f00718ce1292f50ffbf5cd70b8911 target/wasm32-unknown-unknown/release/abstract_dex_adapter.wasm
8c1833c8f3f5898959299997758c7f5a2e8567a8e6801ed38288d41971ba15e2 target/wasm32-unknown-unknown/release/abstract_etf.wasm
5e8e3fa963f0b67313e699be2a37942af2f82bbe386e8b0715c174725e1cb702 target/wasm32-unknown-unknown/release/abstract_tendermint_staking_adapter.wasm
35a7bef7ab94237fe3c37be61837427263bf7802cf1458279c40bc2ea3f6daf9 target/wasm32-unknown-unknown/release/croncat_app.wasm
Binary file modified modules/artifacts/croncat_app.wasm
Binary file not shown.
Binary file modified modules/artifacts/dca_app.wasm
Binary file not shown.
Binary file modified modules/artifacts/etf_app.wasm
Binary file not shown.
43 changes: 34 additions & 9 deletions modules/contracts/adapters/cw-staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,45 @@ interface = [
"export",
"abstract-staking-standard/interface",
]
juno = ["abstract-wyndex-adapter/full_integration", "dep:cw-controllers"]
osmosis = ["abstract-osmosis-adapter/full_integration"]
terra2 = ["abstract-astroport-adapter/full_integration"]
neutron = ["abstract-astroport-adapter/full_integration"]
kujira = ["abstract-kujira-adapter/full_integration"]
schema = ["abstract-adapter/schema"]
testing = ["abstract-wyndex-adapter/local", "abstract-astroport-adapter/local"]
testing = ["abstract-wyndex-adapter/local"]
cw-orch = ["dep:cw-orch"]
# Remove after optimizer toolchain bumps to 1.71.0
# Keep this until https://github.com/osmosis-labs/test-tube/issues/28 is fixed!
# TODO: Remove
cw-orch = ["dep:cw-orch"] # Remove after optimizer toolchain bumps to 1.71.0
osmosis-test = ["cw-orch/osmosis-test-tube"]

# Supported Dexes
wynd = ["abstract-wyndex-adapter/full_integration", "dep:cw-controllers"]
osmosis = ["abstract-osmosis-adapter/full_integration"]
astroport = ["abstract-astroport-adapter/full_integration"]
bow = ["abstract-kujira-adapter/full_integration"]

# Builds
[package.metadata.optimizer]
features = ["juno", "terra2", "osmosis", "kujira", "neutron"]
builds = [
{ name = "juno", features = [
"wynd",
] },
{ name = "terra", features = [
"astroport",
] },
{ name = "neutron", features = [
"astroport",
] },
{ name = "osmosis", features = [
"osmosis",
] },
{ name = "kujira", features = [
"bow",
] },
{ name = "injective", features = [
"astroport",
] },
{ name = "sei", features = [
"astroport",
] },
]

[dependencies]
cosmwasm-schema = { workspace = true }
Expand Down Expand Up @@ -98,7 +123,7 @@ abstract-interface = { workspace = true }
clap = { workspace = true }
cw-staking = { path = ".", features = [
"interface",
"juno",
"wynd",
"osmosis",
], package = "abstract-cw-staking" }
abstract-sdk = { workspace = true, features = ["test-utils"] }
Expand Down
6 changes: 3 additions & 3 deletions modules/contracts/adapters/cw-staking/src/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ pub(crate) fn resolve_local_provider(
name: &str,
) -> Result<Box<dyn CwStakingCommand>, CwStakingError> {
match name {
#[cfg(feature = "juno")]
#[cfg(feature = "wynd")]
abstract_wyndex_adapter::WYNDEX => {
Ok(Box::<abstract_wyndex_adapter::staking::WynDex>::default())
}
#[cfg(feature = "osmosis")]
abstract_osmosis_adapter::OSMOSIS => {
Ok(Box::<abstract_osmosis_adapter::staking::Osmosis>::default())
}
#[cfg(any(feature = "terra2", feature = "neutron"))]
#[cfg(feature = "astroport")]
abstract_astroport_adapter::ASTROPORT => {
Ok(Box::<abstract_astroport_adapter::staking::Astroport>::default())
}
#[cfg(feature = "kujira")]
#[cfg(feature = "bow")]
abstract_kujira_adapter::KUJIRA => {
Ok(Box::<abstract_kujira_adapter::staking::Kujira>::default())
}
Expand Down
42 changes: 34 additions & 8 deletions modules/contracts/adapters/dex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,46 @@ required-features = ["schema"]
default = ["export"]
export = []
interface = ["dep:abstract-interface", "dep:cw-orch", "export"]
juno = [
schema = ["abstract-adapter/schema"]
testing = ["abstract-wyndex-adapter/local", "abstract-astroport-adapter/local"]

# Supported Dexes
wynd = [
"dep:wasmswap",
"dep:cw20_junoswap",
"abstract-wyndex-adapter/full_integration",
]
terra2 = ["dep:terraswap", "abstract-astroport-adapter/full_integration"]
neutron = ["abstract-astroport-adapter/full_integration"]
osmosis = ["abstract-osmosis-adapter/full_integration"]
kujira = ["abstract-kujira-adapter/full_integration"]
schema = ["abstract-adapter/schema"]
testing = ["abstract-wyndex-adapter/local", "abstract-astroport-adapter/local"]
astroport = ["abstract-astroport-adapter/full_integration"]
bow = ["abstract-kujira-adapter/full_integration"]
terraswap = ["dep:terraswap"]

# Builds
[package.metadata.optimizer]
features = ["juno", "terra2", "osmosis", "kujira", "neutron"]
builds = [
{ name = "juno", features = [
"wynd",
] },
{ name = "terra", features = [
"astroport",
"terraswap",
] },
{ name = "neutron", features = [
"astroport",
] },
{ name = "osmosis", features = [
"osmosis",
] },
{ name = "kujira", features = [
"bow",
] },
{ name = "injective", features = [
"astroport",
] },
{ name = "sei", features = [
"astroport",
] },
]

[dependencies]
cosmwasm-std = { workspace = true }
Expand Down Expand Up @@ -96,7 +122,7 @@ abstract-testing = { workspace = true }
abstract-sdk = { workspace = true, features = ["test-utils"] }
dex = { path = ".", features = [
"interface",
"juno",
"wynd",
], package = "abstract-dex-adapter" }

abstract-wyndex-adapter = { workspace = true, features = ["local"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ pub(crate) fn identify_exchange(value: &str) -> Result<Box<dyn Identify>, DexErr

pub(crate) fn resolve_exchange(value: &str) -> Result<&'static dyn DexCommand, DexError> {
match value {
#[cfg(feature = "juno")]
#[cfg(feature = "wynd")]
crate::exchanges::junoswap::JUNOSWAP => Ok(&crate::exchanges::junoswap::JunoSwap {}),
#[cfg(feature = "juno")]
#[cfg(feature = "wynd")]
abstract_wyndex_adapter::WYNDEX => Ok(&abstract_wyndex_adapter::dex::WynDex {}),
#[cfg(feature = "osmosis")]
abstract_osmosis_adapter::OSMOSIS => Ok(&abstract_osmosis_adapter::dex::Osmosis {
local_proxy_addr: None,
}),
#[cfg(feature = "terra2")]
#[cfg(feature = "terraswap")]
crate::exchanges::terraswap::TERRASWAP => Ok(&crate::exchanges::terraswap::Terraswap {}),
#[cfg(any(feature = "terra2", feature = "neutron"))]
#[cfg(feature = "astroport")]
abstract_astroport_adapter::ASTROPORT => Ok(&abstract_astroport_adapter::dex::Astroport {}),
#[cfg(feature = "kujira")]
#[cfg(feature = "bow")]
abstract_kujira_adapter::KUJIRA => Ok(&abstract_kujira_adapter::dex::Kujira {}),
_ => Err(DexError::ForeignDex(value.to_owned())),
}
Expand Down
6 changes: 3 additions & 3 deletions modules/contracts/adapters/dex/src/exchanges/junoswap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ impl Identify for JunoSwap {
}
}

#[cfg(feature = "juno")]
#[cfg(feature = "wynd")]
use ::{
abstract_core::objects::PoolAddress,
abstract_dex_standard::DexError,
Expand All @@ -30,7 +30,7 @@ use ::{
wasmswap::msg::*,
};

#[cfg(feature = "juno")]
#[cfg(feature = "wynd")]
impl DexCommand for JunoSwap {
fn swap(
&self,
Expand Down Expand Up @@ -301,7 +301,7 @@ impl DexCommand for JunoSwap {
}
}

#[cfg(feature = "juno")]
#[cfg(feature = "wynd")]
fn denom_and_asset_match(denom: &Denom, asset: &AssetInfo) -> Result<bool, DexError> {
match denom {
Denom::Native(denom_name) => match asset {
Expand Down
6 changes: 3 additions & 3 deletions modules/contracts/adapters/dex/src/exchanges/terraswap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl Identify for Terraswap {
}
}

#[cfg(feature = "terra2")]
#[cfg(feature = "terraswap")]
use ::{
abstract_core::objects::PoolAddress,
abstract_dex_standard::{coins_in_assets, cw_approve_msgs},
Expand All @@ -26,7 +26,7 @@ use ::{
terraswap::pair::{PoolResponse, SimulationResponse},
};

#[cfg(feature = "terra2")]
#[cfg(feature = "terraswap")]
impl DexCommand for Terraswap {
fn swap(
&self,
Expand Down Expand Up @@ -213,7 +213,7 @@ impl DexCommand for Terraswap {
}
}

#[cfg(feature = "terra2")]
#[cfg(feature = "terraswap")]
fn cw_asset_to_terraswap(asset: &Asset) -> Result<terraswap::asset::Asset, DexError> {
match &asset.info {
AssetInfoBase::Native(denom) => Ok(terraswap::asset::Asset {
Expand Down
2 changes: 1 addition & 1 deletion modules/contracts/apps/challenge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ croncat-integration-testing = { version = "1.1.1" }
wyndex-bundle = { workspace = true }
abstract-dex-adapter = { workspace = true, features = [
"interface",
"juno",
"wynd",
"testing",
] }
croncat-app = { workspace = true, features = ["interface"] }
Loading

0 comments on commit f44c68e

Please sign in to comment.