AcalaNetwork / acala.js

https://developer.acala.network/
Apache License 2.0
59 stars 26 forks source link

Acala vs Karura swap sdk #509

Closed dudo50 closed 9 months ago

dudo50 commented 10 months ago

Do Acala and Karura have the same swap SDK? We are unable to find dApps in github repositories.

We are implementing the XCM router package and we wish to map every native exchange to give users the ability to swap while XCM.

Thank you in advance.

xlc commented 10 months ago

The swap function is the same between Acala and Karura

dudo50 commented 10 months ago

The swap function is the same between Acala and Karura

@xlc

Does it contain assets for both Acala and Karura? Or do these swap-supported assets have to be imported from elsewhere? Thanks in advance.

xlc commented 10 months ago

The assets and trading pairs are queried from onchain state. acala.js provides the SDK to perform those queries

dudo50 commented 10 months ago

@xlc could you point me to it via link? Many thanks!

xlc commented 10 months ago

We don't have lots docs but hopefully the code is easy enough to understand https://github.com/AcalaNetwork/acala.js/blob/master/packages/sdk-swap/src/dex.ts

dudo50 commented 9 months ago

Got it working. Thanks!