It states demo code but the origin of some values is unknown. Some values like new BN('1000000000000') isnt exported from the SDK. Where does the value come from?
This call here: sdk.RouterV2.getBestRouter(SUI, USDC, 11111111000000, true, 0.5, '', undefined, true, false) also includes 2 unknown variables SUI and USDC and a parameter is not correct according to the TS interface.
There are more issues like this in the snippet.
I propose to get the documentation updated together. Can someone post me a working snippet for using the smart router v2 for a simple swap please?
I am looking for some developer support. The documentation for doing a smart router v2 swap is incomplete: https://cetus-1.gitbook.io/cetus-developer-docs/developer/via-sdk/features-available/smart-router-v2#build-router-v2-swap-transaction
It states demo code but the origin of some values is unknown. Some values like
new BN('1000000000000')
isnt exported from the SDK. Where does the value come from? This call here:sdk.RouterV2.getBestRouter(SUI, USDC, 11111111000000, true, 0.5, '', undefined, true, false)
also includes 2 unknown variables SUI and USDC and a parameter is not correct according to the TS interface.There are more issues like this in the snippet. I propose to get the documentation updated together. Can someone post me a working snippet for using the smart router v2 for a simple swap please?