Skip to content

Commit b3f3007

Browse files
authoredMar 19, 2025
refactor(tokens): improve token not found validation and code restructuring (#429)
* feat: orderly network plugin structure * fix(swap exact tokens): improve swap validation * refactor(tokens): improve token not found validation and code restructuring * docs(usage): add advanced usage section for ERC20 integration * fix: remove plugin mistakenly uploaded
1 parent 3202cab commit b3f3007

File tree

9 files changed

+226
-667
lines changed

9 files changed

+226
-667
lines changed
 

‎typescript/packages/plugins/velodrome/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@ const tools = await getOnChainTools({
2626
});
2727
```
2828

29+
## Advanced Usage with ERC20 Plugin
30+
31+
For improved integration to work seamlessly with the ERC20 plugin, you can configure your tools as follows:
32+
33+
```typescript
34+
import { MODE, erc20 } from "@goat-sdk/plugin-erc20";
35+
import { modeGovernance } from "@goat-sdk/plugin-mode-governance";
36+
37+
const tools = await getOnChainTools({
38+
wallet: // ...
39+
plugins: [
40+
erc20({ tokens: [MODE] }),
41+
modeGovernance()
42+
]
43+
});
44+
```
2945
## Tools
3046
- Add liquidity
3147
- Swap tokens

‎typescript/packages/plugins/velodrome/package.json

+11-19
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,10 @@
77
"clean": "rm -rf dist",
88
"test": "vitest run --passWithNoTests"
99
},
10-
"sideEffects": false,
1110
"main": "./dist/index.js",
1211
"module": "./dist/index.mjs",
1312
"types": "./dist/index.d.ts",
14-
"exports": {
15-
".": {
16-
"require": "./dist/index.js",
17-
"import": "./dist/index.mjs",
18-
"types": "./dist/index.d.ts"
19-
}
20-
},
21-
"dependencies": {
22-
"@goat-sdk/core": "workspace:*",
23-
"@goat-sdk/wallet-evm": "workspace:*",
24-
"viem": "catalog:",
25-
"zod": "catalog:"
26-
},
27-
"peerDependencies": {
28-
"@goat-sdk/core": "workspace:*",
29-
"viem": "catalog:"
30-
},
13+
"sideEffects": false,
3114
"homepage": "https://ohmygoat.dev",
3215
"repository": {
3316
"type": "git",
@@ -37,5 +20,14 @@
3720
"bugs": {
3821
"url": "https://github.com/goat-sdk/goat/issues"
3922
},
40-
"keywords": ["ai", "agents", "web3"]
23+
"keywords": ["ai", "agents", "web3"],
24+
"dependencies": {
25+
"@goat-sdk/core": "workspace:*",
26+
"@goat-sdk/wallet-evm": "workspace:*",
27+
"viem": "catalog:",
28+
"zod": "catalog:"
29+
},
30+
"peerDependencies": {
31+
"@goat-sdk/core": "workspace:*"
32+
}
4133
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./quoter.abi";
2+
export * from "./router.abi";

‎typescript/packages/plugins/velodrome/src/abi/quoterabi.ts ‎typescript/packages/plugins/velodrome/src/abi/quoter.abi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const quoterabi = [
1+
export const QUOTER_ABI = [
22
{
33
inputs: [
44
{

‎typescript/packages/plugins/velodrome/src/abi/routerabi.ts ‎typescript/packages/plugins/velodrome/src/abi/router.abi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const routerabi = [
1+
export const ROUTER_ABI = [
22
{
33
inputs: [
44
{

0 commit comments

Comments
 (0)