Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.4.0 #32

Merged
merged 15 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 3 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Apollo Devs <[email protected]>"]
edition = "2021"
name = "cw-dex-router"
version = "0.4.0-rc.2"
version = "0.4.0"
readme = "README.md"
repository = "https://github.com/apollodao/cw-dex-router"
homepage = "https://apollo.farm"
Expand Down Expand Up @@ -59,10 +59,9 @@ thiserror = "1.0.38"
apollo-utils = "0.1.0"
cw-dex-osmosis = { version = "0.1.0", optional = true }
cw-dex-astroport = { version = "0.1.1", optional = true }
cw-dex-router-0_3 = { package = "cw-dex-router", version = "0.3" }

[dev-dependencies]
cw-it = { version = "0.3.0", features = ["osmosis-test-tube"] }
cw-it = { version = "0.3.1", features = ["osmosis-test-tube"] }
test-case = "3.0.0"
serde_json = "1.0.107"

Expand Down
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ skip_core_tasks = true

[env]
# If you bump this version, verify RUST_VERSION correctness
RUST_OPTIMIZER_VERSION = "0.15.0"
RUST_OPTIMIZER_VERSION = "0.15.1"
apollo-sturdy marked this conversation as resolved.
Show resolved Hide resolved
# Use rust version from rust-optimizer Dockerfile (see https://github.com/CosmWasm/rust-optimizer/blob/main/Dockerfile#L1)
# to be sure that we compile / test against the same version
RUST_VERSION = "1.75.0"
Expand Down
18 changes: 8 additions & 10 deletions tests/migrate_from_0_1_0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@ mod tests {
const UOSMO_UATOM_PATH: &[(u64, &str, &str); 1] = &[(1, UOSMO, UATOM)];
const UION_UATOM_PATH: &[(u64, &str, &str); 2] = &[(2, UION, UOSMO), (1, UOSMO, UATOM)];

#[allow(deprecated)]
#[cfg(feature = "osmosis")]
fn osmosis_swap_operations_list_from_vec(
vec: &[(u64, &str, &str)],
) -> cw_dex_router_0_3::operations::SwapOperationsList {
cw_dex_router_0_3::operations::SwapOperationsList::new(
) -> cw_dex_router::operations::SwapOperationsList {
cw_dex_router::operations::SwapOperationsList::new(
vec.iter()
.map(
|(pool_id, from, to)| cw_dex_router_0_3::operations::SwapOperation {
pool: cw_dex::Pool::Osmosis(
cw_dex::implementations::osmosis::OsmosisPool::unchecked(
pool_id.to_owned(),
),
|(pool_id, from, to)| cw_dex_router::operations::SwapOperation {
pool: cw_dex_router::operations::Pool::Osmosis(
cw_dex_osmosis::OsmosisPool::unchecked(pool_id.to_owned()),
),
offer_asset_info: AssetInfo::Native(from.to_string()),
ask_asset_info: AssetInfo::Native(to.to_string()),
Expand Down Expand Up @@ -106,7 +104,7 @@ mod tests {

// Store two routes
// OSMO -> ATOM
let execute_msg = cw_dex_router_0_3::msg::ExecuteMsg::SetPath {
let execute_msg = cw_dex_router::msg::ExecuteMsg::SetPath {
offer_asset: AssetInfoUnchecked::Native(UOSMO.to_string()),
ask_asset: AssetInfoUnchecked::Native(UATOM.to_string()),
path: osmosis_swap_operations_list_from_vec(UOSMO_UATOM_PATH).into(),
Expand All @@ -115,7 +113,7 @@ mod tests {
wasm.execute(&contract_addr, &execute_msg, &[], &admin)
.unwrap();
// ION -> OSMO -> ATOM
let execute_msg = cw_dex_router_0_3::msg::ExecuteMsg::SetPath {
let execute_msg = cw_dex_router::msg::ExecuteMsg::SetPath {
offer_asset: AssetInfoUnchecked::Native(UION.to_string()),
ask_asset: AssetInfoUnchecked::Native(UATOM.to_string()),
path: osmosis_swap_operations_list_from_vec(UION_UATOM_PATH).into(),
Expand Down
Loading