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

Some Nits and Issues on the Dex adapter and variable naming #240

Open
Kayanski opened this issue Feb 7, 2024 · 1 comment
Open

Some Nits and Issues on the Dex adapter and variable naming #240

Kayanski opened this issue Feb 7, 2024 · 1 comment

Comments

@Kayanski
Copy link
Contributor

Kayanski commented Feb 7, 2024

Here are some issues I have with the Dex Adapter

  1. The error type shouldn't be a generic but rather a type in
    pub trait DexCommand<E: Error = DexError>: Identify {
  2. We are using AnsAsset and AssetEntry when cw_asset uses Asset and AssetInfo. Shouldn't we use similare naming, AnsAsset and AnsAssetInfo ?
  3. We provide replies here but they don't seem to be used anywhere else, is that normal ?
    (
    self.resolve_provide_liquidity(
    deps,
    sender,
    assets,
    exchange.as_mut(),
    max_spread,
    )?,
    PROVIDE_LIQUIDITY,
    )
  4. All dex/staking adapters need to implement the Default trait to be able to identify them. Shouldn't be add the Default trait as a requirement for the Identify trait?
@CyberHoward
Copy link
Contributor

  1. and 2. are very good feedback.

  2. is because of IBC. if an action is performed "over IBC" then the adapter should return an ibc callback with that ID. At least that was the idea. I think the IBC aspect of these adapters needs a major revamp, but we can do that when we get there.

  3. Yes, good spot!

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

No branches or pull requests

2 participants