Skip to content

fix: fix uniswap integration and add swap type support with Uniswap exact-output and slippage controls#30

Merged
ggonzalez94 merged 3 commits intomainfrom
fix/uniswap-swapper-quote-field
Feb 25, 2026
Merged

fix: fix uniswap integration and add swap type support with Uniswap exact-output and slippage controls#30
ggonzalez94 merged 3 commits intomainfrom
fix/uniswap-swapper-quote-field

Conversation

@ggonzalez94
Copy link
Owner

@ggonzalez94 ggonzalez94 commented Feb 25, 2026

Summary

  • add swap quote --type with exact-input|exact-output (default exact-input)
  • add exact-output amount flags: --amount-out / --amount-out-decimal
  • add trade_type to swap quote rows
  • implement Uniswap exact-output support and keep exact-input as default
  • keep --slippage-pct for Uniswap, and now fail fast for other providers to avoid silent ignores
  • add provider gating for unsupported swap types (1inch, jupiter, fibrous, bungee remain exact-input only)
  • update README, AGENTS, changelog, and Mintlify swap docs/reference/concepts

Validation

  • go test ./...
  • go test -race ./...
  • go vet ./...
  • cd docs && npx --yes mint@4.2.378 validate
  • cd docs && npx --yes mint@4.2.378 broken-links

Smoke checks

  • Uniswap exact-input quote succeeds
  • Uniswap exact-output quote succeeds with both --amount-out and --amount-out-decimal
  • exact-output with non-Uniswap providers returns unsupported (exit code 13)
  • invalid type/amount/slippage combinations return usage errors (exit code 2)

Note

Medium Risk
Touches swap quote request/response schema and provider integrations (notably Uniswap), which can affect automation consumers and quote correctness; changes are well-covered by new unit tests but still impact a core CLI path.

Overview
Adds swap quote trade-type support via --type exact-input|exact-output plus exact-output amount flags (--amount-out, --amount-out-decimal), and returns trade_type on all swap quote rows.

Updates CLI routing/validation so EVM exact-output defaults to uniswap (Solana exact-output rejected), enforces --slippage-pct as a Uniswap-only manual override, and incorporates these inputs into the swap quote cache key.

Fixes the Uniswap Trade API integration by sending required fields (swapper, autoSlippage/slippageTolerance) and handling string-encoded gas USD fields; other providers now explicitly reject non-exact-input requests. Docs/README/CHANGELOG are updated and extensive provider/runner tests were added for new behaviors.

Written by Cursor Bugbot for commit 0f4db41. This will update automatically on new commits. Configure here.

@ggonzalez94 ggonzalez94 changed the title Add swap type support with Uniswap exact-output and slippage controls fix: fix uniswap integration and add swap type support with Uniswap exact-output and slippage controls Feb 25, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 65592eafe5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ggonzalez94 ggonzalez94 merged commit e704c71 into main Feb 25, 2026
15 of 16 checks passed
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