AbstractSDK / abstract

The ultimate CosmWasm framework for modular Interchain applications.
https://docs.abstract.money/
GNU General Public License v3.0
62 stars 19 forks source link

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

Open Kayanski opened 9 months ago

Kayanski commented 9 months ago

Here are some issues I have with the Dex Adapter

  1. The error type shouldn't be a generic but rather a type in https://github.com/AbstractSDK/abstract/blob/8882b7af16ce764c6091b4f1c916b1210d07eaeb/framework/packages/standards/dex/src/command.rs#L23
  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 ? https://github.com/AbstractSDK/abstract/blob/8882b7af16ce764c6091b4f1c916b1210d07eaeb/modules/contracts/adapters/dex/src/adapter.rs#L41-L50
  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 commented 9 months ago
  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!