Skip to content

feat: Add Suwappu DeFi tools for cross-chain token operations#5265

Open
0xSoftBoi wants to merge 1 commit intocrewAIInc:mainfrom
0xSoftBoi:feat/suwappu-defi-tools
Open

feat: Add Suwappu DeFi tools for cross-chain token operations#5265
0xSoftBoi wants to merge 1 commit intocrewAIInc:mainfrom
0xSoftBoi:feat/suwappu-defi-tools

Conversation

@0xSoftBoi
Copy link
Copy Markdown

Summary

Adds a suite of 5 DeFi tools for cross-chain token operations via the Suwappu DEX aggregator API:

  • SuwappuGetPricesTool — real-time USD prices and 24h changes for any token
  • SuwappuGetQuoteTool — swap quotes with price impact, optimal route, gas estimates, and fees
  • SuwappuGetPortfolioTool — wallet token balance tracking across all supported chains
  • SuwappuListChainsTool — discover all 15+ supported blockchain networks
  • SuwappuListTokensTool — list available tokens on a specific chain

Supports Ethereum, Base, Arbitrum, Solana, and 10+ more networks.

What's included

  • Tool implementations following BaseTool pattern with Pydantic schemas, EnvVar declarations, and proper async handling
  • Full test suite (12 tests) with mocked API calls — no network access required
  • README with usage examples and setup instructions
  • Registered in __init__.py and __all__

Dependencies

  • suwappu (peer dependency, lazy-imported with helpful error message if missing)

Test plan

  • All 5 tools have initialization tests verifying name and description
  • All tools with API calls have mocked integration tests verifying correct arguments and response parsing
  • Edge case: optional chain parameter correctly passes None when empty
  • All async client connections properly closed in finally blocks

Add 5 new tools for DeFi operations via the Suwappu DEX aggregator API:

- SuwappuGetPricesTool: real-time token prices and 24h changes
- SuwappuGetQuoteTool: cross-chain swap quotes with route/gas/fees
- SuwappuGetPortfolioTool: wallet balance tracking across chains
- SuwappuListChainsTool: supported blockchain network discovery
- SuwappuListTokensTool: available token listing per chain

Supports 15+ chains including Ethereum, Base, Arbitrum, and Solana.
Includes full test suite with mocked API calls and README with examples.
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