Skip to content

Conversation

@alexohre
Copy link

🚀 Enhanced AutoSwap SDK: StarkNet v7 Migration & Quote System

📋 Summary

This PR introduces significant improvements to the AutoSwap SDK, bringing it up to modern StarkNet standards and adding essential trading functionality that users have been requesting.

✨ What's New

🔄 StarkNet v7.6.4 Migration

  • Upgraded from StarkNet v5.19.5 → v7.6.4 for better performance and compatibility
  • Gas fees now default to STRK tokens instead of ETH, aligning with StarkNet's latest fee structure
  • Enhanced transaction reliability with improved RPC provider configuration
  • Better error handling for network-related issues

💰 Smart Quote System

  • Added getSwapQuote() method - finally! Users can now preview swap rates before executing
  • Real-time price estimation using live Ekubo pool data
  • Comprehensive quote details including:
    • Expected output amounts
    • Exchange rates (e.g., "1 USDC = 7.84 STRK")
    • Price impact calculations
    • Pool fees and gas estimates
  • Dynamic gas estimation based on swap complexity and token types

🛠️ Developer Experience Improvements

  • Enhanced error handling with detailed, actionable error messages
  • Better TypeScript support with improved type definitions
  • Comprehensive logging for debugging swap calculations
  • Input validation to prevent common user errors

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

Successfully merging this pull request may close these issues.

1 participant