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

swap logic generalize #616

Merged
merged 64 commits into from
Jun 27, 2024
Merged

swap logic generalize #616

merged 64 commits into from
Jun 27, 2024

Conversation

magiodev
Copy link
Member

@magiodev magiodev commented Jun 6, 2024

1. Overview

  • Generalized and cleaned up swap logic
  • Updated attributes and moved CoinList to generic helpers
  • Added Rust dependencies and updated README
  • Refactored CW DEX implementation after refactoring and monorepoing it
  • Updated optimizer to v16 and merged changes from upstream feature branch
  • Refactored tests
  • Solved some TODOs
  • Range middleware adjustments accordingly to cl-vault ModifyRange msg

2. Implementation details

3. How to test/use

4. Checklist

  • Does the Readme need to be updated?

5. Limitations (optional)

6. Future Work (optional)

@magiodev magiodev marked this pull request as ready for review June 12, 2024 10:55
magiodev and others added 21 commits June 26, 2024 13:52
## 1. Overview

<!-- What are you changing, removing, or adding in this review? -->

## 2. Implementation details

<!-- Describe the implementation (highlights only) as well as design
rationale. -->

## 3. How to test/use

<!-- How can people test/use this? -->

## 4. Checklist

<!-- Checklist for PR author(s). -->

- [ ] Does the Readme need to be updated?

## 5. Limitations (optional)

<!-- Describe any limitation of the capabilities listed in the Overview
section. -->

## 6. Future Work (optional)

<!-- Describe follow up work, if any. -->

---------

Co-authored-by: Laurens <32776056+LaurensKubat@users.noreply.github.com>
Co-authored-by: Lars Lubkoll <11710767+lubkoll@users.noreply.github.com>
# Conflicts:
#	smart-contracts/Cargo.lock
#	smart-contracts/Cargo.toml
#	smart-contracts/contracts/dex-router-osmosis/README.md
#	smart-contracts/contracts/dex-router-osmosis/src/contract.rs
#	smart-contracts/contracts/dex-router-osmosis/src/msg.rs
#	smart-contracts/contracts/dex-router-osmosis/src/state.rs
#	smart-contracts/contracts/dex-router-osmosis/src/tests/swap.rs
# Conflicts:
#	smart-contracts/contracts/cl-vault/src/helpers/msgs.rs
#	smart-contracts/contracts/dex-router-osmosis/README.md
#	smart-contracts/contracts/dex-router-osmosis/src/contract.rs
#	smart-contracts/contracts/dex-router-osmosis/src/msg.rs
#	smart-contracts/contracts/dex-router-osmosis/src/state.rs
#	smart-contracts/contracts/dex-router-osmosis/src/tests/swap.rs
@magiodev magiodev requested a review from lubkoll June 27, 2024 12:23
@@ -84,13 +83,21 @@ pub fn execute_any_deposit(
// rest minting logic remains same
Ok(Response::new()
.add_submessage(SubMsg::reply_on_success(
swap_msg,
swap_calc_result.swap_msg,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We create the same message below in line 129. We could just read the data for the attributes in the if-else-branch and then have one return statement instead of one for each branch

@magiodev magiodev changed the base branch from main to feat/merge_swap_opt June 27, 2024 12:58
@magiodev magiodev merged commit 374eed5 into feat/merge_swap_opt Jun 27, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants