Uh oh!
There was an error while loading. Please reload this page.
Sushi: swap, quote and find-token actions - #309
Conversation
✅ Heimdall Review Status
|
phdargen
commented
Sep 30, 2025
Hi @LufyCZ, thanks for your contribution! Looks great, could you please rebase against main, then I will do some manual testing? A few initial comments below |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| @@ -0,0 +1 @@ | |||
| # Sushi Swap, Quote and Token provider | |||
There was a problem hiding this comment.
Could you please fill this in the style of other action providers, see eg https://github.com/coinbase/agentkit/blob/main/typescript/agentkit/src/action-providers/erc20/README.md
Also please add an entry for sushi here in alphabetic order: https://github.com/coinbase/agentkit/blob/main/typescript/agentkit/README.md
LufyCZ
commented
Sep 30, 2025
@phdargen hey, all done and tested I had issues with the newer version of our package though, with it being esm (`"type": "module"). I'd suggest you fully move to ESM as well, should make the lives of everyone a bit better, but, in the meantime, the changes I made to the tsconfig should make it cooperate. I also had to replace Hopefully that won't be too big of an issue. |
Uh oh!
There was an error while loading. Please reload this page.
phdargen
commented
Oct 1, 2025
Hi @LufyCZ, thanks for the changes! I tested it without any issues. Just one minor follow-up above. Please also remove the sushi actions from the chatbot examples and template, these are meant to stay minimal for new users. Through the READMEs the sushi actions should be easy to discover for users and quick to add if desired. Thanks for your understanding. |
phdargen
commented
Oct 1, 2025
Concerning the |
LufyCZ
commented
Oct 1, 2025
np, I just forgot to remove it after testing 😅 |
| fromAssetAddress: "0xe6b2af36b3bb8d47206a129ff11d5a2de2a63c83", | ||
| amount: "0.0001", | ||
| toAssetAddress: "0x1234567890123456789012345678901234567890", | ||
| chainId: 1, |
phdargen
commented
Oct 3, 2025
Sorry @LufyCZ, we still have some issues with the unit tests. For the sushi action, it should be enough to remove one line (see above). Unfortunately, also a couple of other tests for actions that use dynamic imports are failing now because of the tsconfig change. I found that adding Please make sure that all tests pass before you commit and lets get your PR in. I will follow this up removing the dynamic imports that should no longer be needed and eventually we should move to full ESM as you suggested |
LufyCZ
commented
Oct 5, 2025
Yeah, I figured that it might end up being an issue... If it's a blocker, the PR can wait, happy to rebase it again down the road though. Pushed a fix, ran a test for the sushi action folder, all good. |
phdargen
commented
Oct 9, 2025
Hey @LufyCZ, we merged a PR that should hopefully fix the remaining unit test. Could you please rebase again? Thanks for your patience |
LufyCZ
commented
Oct 11, 2025
Done. |
cb-heimdall
commented
Nov 17, 2025
Review Error for carsonroscoe-cb @ 2025-11-17 14:52:28 UTC |
What changed? Why?
sushiRouterActionProviderto provide swap and quote functionality using the Sushi Router API.swapaction for swaps.quoteaction for fetching quotes for swaps.sushiDataActionProviderto provide token finding functionality using the Sushi Data API.find-tokensaction for fetching tokens by symbols or addresses.Why? No on-chain swap solution was present. Also, the agent didn't have a repository to pull token details from.
Features
End-to-End swap on-chain experience. Asking the agent to "Swap 1 ETH to USDC" results in a successful swap. The agent first looks up the address of "USDC" (it already knows that ETH is 0xee...ee in the context of Sushi), then, it fetches a quote and asks the user if they want to continue. If they do, the swap is executed. Cases like insufficient balance or allowance is handled.
Qualified Impact
Nothing should be affected, worst case, the user can remove the sushi actions.
Showcase