Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sushi: swap, quote and find-token actions #309

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 136 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions typescript/agentkit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

- Added `sushiRouterActionProvider` to provide swap and quote functionality using the Sushi Router API.
- Added `swap` action for swaps.
- Added `quote` action for fetching quotes for swaps.
- Added `sushiDataActionProvider` to provide token finding functionality using the Sushi Data API.
- Added `find-tokens` action for fetching tokens by symbols or addresses.

## [0.1.2] - 2025-02-07

### Added
Expand Down
1 change: 1 addition & 0 deletions typescript/agentkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@coinbase/coinbase-sdk": "^0.17.0",
"md5": "^2.3.0",
"reflect-metadata": "^0.2.2",
"sushi": "5.0.13",
"twitter-api-v2": "^1.18.2",
"viem": "^2.22.16",
"zod": "^3.23.8"
Expand Down
1 change: 1 addition & 0 deletions typescript/agentkit/src/action-providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ export * from "./wallet";
export * from "./customActionProvider";
export * from "./alchemy";
export * from "./moonwell";
export * from "./sushi";
1 change: 1 addition & 0 deletions typescript/agentkit/src/action-providers/sushi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Sushi Swap, Quote and Token provider
5 changes: 5 additions & 0 deletions typescript/agentkit/src/action-providers/sushi/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { parseAbi } from "viem";

export const routeProcessor5Abi_Route = parseAbi([
"event Route(address indexed from, address to, address indexed tokenIn, address indexed tokenOut, uint256 amountIn, uint256 amountOutMin, uint256 amountOut)",
]);
4 changes: 4 additions & 0 deletions typescript/agentkit/src/action-providers/sushi/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from "./sushiDataSchemas";
export * from "./sushiDataActionProvider";
export * from "./sushiRouterSchemas";
export * from "./sushiRouterActionProvider";
Loading