Utils library for 1inch Fusion Mode.
Experience fusion swap in app at Avacus
Feel free to use and don't hesitate to raise issue if there are.
Import and create instance
import 'package:fusion_swap_sdk/fusion_swap_sdk.dart';
final _fusionSDK = FusionSDK(chainId: chainId);
Get quote
final quote = await _fusionSDK.getQuote(fromTokenAddress: fromTokenAddress, toTokenAddress: toTokenAddress, amount: amount);
Create order
final order = await _fusionSDK.createOrder(fromTokenAddress: fromTokenAddress, toTokenAddress: toTokenAddress, amount: amount, walletAddress: walletAddress);
Submit order
await _fusionSDK.submitOrder(preparedOrder: preparedOrder, signature: signature);
Get order status
final status = await _fusionSDK.submitOrder(orderHash: orderHash);