Skip to content

feat(celo): add token swap routing optimization support and Ubeswap helper guidelines - #50

Open
d3v-active wants to merge 1 commit into
Ender-Stellar:mainfrom
d3v-active:feat/celo-swap-routing
Open

feat(celo): add token swap routing optimization support and Ubeswap helper guidelines#50
d3v-active wants to merge 1 commit into
Ender-Stellar:mainfrom
d3v-active:feat/celo-swap-routing

Conversation

@d3v-active

Copy link
Copy Markdown

this pr closes #30

Summary

Add token swap routing optimization support using Uniswap/Ubeswap helpers to the Celo developer guidelines in celo-prompt.ts.

Changes

  • Updated lib/prompts/celo-prompt.ts with:
    • Ubeswap Router Smart Contract ABI/Interface details and common address mappings.
    • A custom React hook useUbeswapRoute that queries different routing paths to find the path that outputs the maximum amount of the destination token.
    • A React component code sample showing how to use the hook, check ERC20 allowance, perform approval when needed, and execute a swap via Ubeswap router.

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.

backend: Add token swap routing optimization support for Celo (using Uniswap/Ubeswap helpers)

1 participant