@clawnch/clawtomaton 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +43 -0
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/prompt.js +1 -1
- package/dist/agent/prompt.js.map +1 -1
- package/dist/skills/analyze-market.d.ts.map +1 -1
- package/dist/skills/analyze-market.js +24 -1
- package/dist/skills/analyze-market.js.map +1 -1
- package/dist/skills/index.d.ts +4 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +13 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/liquidity.d.ts +16 -0
- package/dist/skills/liquidity.d.ts.map +1 -0
- package/dist/skills/liquidity.js +358 -0
- package/dist/skills/liquidity.js.map +1 -0
- package/dist/skills/permit2.d.ts +14 -0
- package/dist/skills/permit2.d.ts.map +1 -0
- package/dist/skills/permit2.js +181 -0
- package/dist/skills/permit2.js.map +1 -0
- package/dist/skills/uniswap-swap.d.ts +17 -0
- package/dist/skills/uniswap-swap.d.ts.map +1 -0
- package/dist/skills/uniswap-swap.js +268 -0
- package/dist/skills/uniswap-swap.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill: uniswap_swap — Direct Uniswap V4 swap via Trading API + on-chain quoter fallback.
|
|
3
|
+
*
|
|
4
|
+
* Two swap paths:
|
|
5
|
+
* 1. Uniswap Trading API (if UNISWAP_API_KEY is set) — hosted aggregation, best prices
|
|
6
|
+
* 2. On-chain V4 Quoter simulation — works without API key, direct V4 pool
|
|
7
|
+
*
|
|
8
|
+
* Supports all 15 Uniswap chains, but defaults to Base (8453).
|
|
9
|
+
*
|
|
10
|
+
* Actions:
|
|
11
|
+
* - swap: Execute a swap via Trading API
|
|
12
|
+
* - quote: Get a quote (price + impact) without executing
|
|
13
|
+
* - deeplink: Generate a Uniswap app deep link for the swap
|
|
14
|
+
*/
|
|
15
|
+
import { UniswapTradingApi, UniswapQuoter, ClawnchSwapper, getUniswapChain, NATIVE_TOKEN_ADDRESS, } from '@clawnch/clawncher-sdk';
|
|
16
|
+
import { parseEther, formatEther } from 'viem';
|
|
17
|
+
export const uniswapSwapSkill = {
|
|
18
|
+
name: 'uniswap_swap',
|
|
19
|
+
description: 'Swap tokens via Uniswap V4 (Trading API or direct V4 pool). ' +
|
|
20
|
+
'Supports quote-only, execute, and deep link generation. ' +
|
|
21
|
+
'Works on all Uniswap-supported chains.',
|
|
22
|
+
parameters: [
|
|
23
|
+
{
|
|
24
|
+
name: 'action',
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Action: "swap" (execute), "quote" (price check), or "deeplink" (generate link).',
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'tokenIn',
|
|
31
|
+
type: 'address',
|
|
32
|
+
description: 'Token to sell. Use "ETH" for native ETH.',
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'tokenOut',
|
|
37
|
+
type: 'address',
|
|
38
|
+
description: 'Token to buy.',
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'amount',
|
|
43
|
+
type: 'string',
|
|
44
|
+
description: 'Amount to sell in human-readable units (e.g. "0.01" for 0.01 ETH).',
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'slippageBps',
|
|
49
|
+
type: 'number',
|
|
50
|
+
description: 'Slippage tolerance in basis points. Default: 50 (0.5%).',
|
|
51
|
+
required: false,
|
|
52
|
+
default: 50,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'chainId',
|
|
56
|
+
type: 'number',
|
|
57
|
+
description: 'Chain ID to trade on. Default: 8453 (Base).',
|
|
58
|
+
required: false,
|
|
59
|
+
default: 8453,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
execute: async (params, ctx) => {
|
|
63
|
+
const action = params.action.toLowerCase();
|
|
64
|
+
try {
|
|
65
|
+
const { buildClients } = await import('../identity/index.js');
|
|
66
|
+
const rpcUrl = process.env.BASE_RPC_URL ?? 'https://mainnet.base.org';
|
|
67
|
+
const { publicClient, walletClient } = buildClients(ctx.identity, rpcUrl);
|
|
68
|
+
const chainId = params.chainId ?? 8453;
|
|
69
|
+
const apiKey = process.env.UNISWAP_API_KEY;
|
|
70
|
+
// Resolve token addresses
|
|
71
|
+
const resolveToken = (input) => {
|
|
72
|
+
if (input.toUpperCase() === 'ETH' || input === '0x0000000000000000000000000000000000000000') {
|
|
73
|
+
return NATIVE_TOKEN_ADDRESS;
|
|
74
|
+
}
|
|
75
|
+
return input;
|
|
76
|
+
};
|
|
77
|
+
const tokenIn = resolveToken(params.tokenIn);
|
|
78
|
+
const tokenOut = resolveToken(params.tokenOut);
|
|
79
|
+
const amountStr = params.amount;
|
|
80
|
+
const slippageBps = params.slippageBps ?? 50;
|
|
81
|
+
// Parse amount (assume 18 decimals for now — ETH/token)
|
|
82
|
+
const sellAmount = parseEther(amountStr);
|
|
83
|
+
if (action === 'deeplink') {
|
|
84
|
+
// Generate Uniswap app deep link — no wallet needed
|
|
85
|
+
const trading = new UniswapTradingApi({
|
|
86
|
+
wallet: walletClient,
|
|
87
|
+
publicClient: publicClient,
|
|
88
|
+
chainId,
|
|
89
|
+
apiKey,
|
|
90
|
+
slippageBps,
|
|
91
|
+
});
|
|
92
|
+
const link = trading.getSwapDeepLink({
|
|
93
|
+
tokenIn,
|
|
94
|
+
tokenOut,
|
|
95
|
+
amount: sellAmount,
|
|
96
|
+
});
|
|
97
|
+
return {
|
|
98
|
+
callId: '',
|
|
99
|
+
success: true,
|
|
100
|
+
result: `Uniswap deep link:\n${link}`,
|
|
101
|
+
metadata: { deeplink: link },
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (action === 'quote') {
|
|
105
|
+
// Try Trading API first, fall back to on-chain quoter
|
|
106
|
+
if (apiKey) {
|
|
107
|
+
const trading = new UniswapTradingApi({
|
|
108
|
+
wallet: walletClient,
|
|
109
|
+
publicClient: publicClient,
|
|
110
|
+
chainId,
|
|
111
|
+
apiKey,
|
|
112
|
+
slippageBps,
|
|
113
|
+
});
|
|
114
|
+
const quote = await trading.getQuote({
|
|
115
|
+
tokenIn,
|
|
116
|
+
tokenOut,
|
|
117
|
+
amount: sellAmount,
|
|
118
|
+
});
|
|
119
|
+
const lines = [
|
|
120
|
+
`Uniswap V4 Quote (Trading API):`,
|
|
121
|
+
`Quoted output: ${formatEther(quote.quoteAmount)}`,
|
|
122
|
+
`Price impact: ${(quote.priceImpact * 100).toFixed(3)}%`,
|
|
123
|
+
`Route: ${quote.routeDescription}`,
|
|
124
|
+
`Gas estimate: ${quote.gasEstimate.toString()}`,
|
|
125
|
+
];
|
|
126
|
+
return {
|
|
127
|
+
callId: '',
|
|
128
|
+
success: true,
|
|
129
|
+
result: lines.join('\n'),
|
|
130
|
+
metadata: {
|
|
131
|
+
quoteAmount: quote.quoteAmount.toString(),
|
|
132
|
+
priceImpact: quote.priceImpact,
|
|
133
|
+
route: quote.routeDescription,
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
// Fallback: on-chain V4 Quoter with Clawnch-aware pool discovery
|
|
138
|
+
const quoter = new UniswapQuoter({
|
|
139
|
+
publicClient: publicClient,
|
|
140
|
+
chainId,
|
|
141
|
+
});
|
|
142
|
+
const chain = getUniswapChain(chainId);
|
|
143
|
+
if (!chain) {
|
|
144
|
+
return { callId: '', success: false, result: null, error: `Chain ${chainId} not supported` };
|
|
145
|
+
}
|
|
146
|
+
// Determine the non-ETH token and direction
|
|
147
|
+
const targetToken = (tokenOut === NATIVE_TOKEN_ADDRESS
|
|
148
|
+
? tokenIn : tokenOut);
|
|
149
|
+
const direction = (tokenIn === NATIVE_TOKEN_ADDRESS ||
|
|
150
|
+
params.tokenIn.toUpperCase() === 'ETH')
|
|
151
|
+
? 'buy' : 'sell';
|
|
152
|
+
// Auto-discovers hook address for Clawnch tokens (reads LP locker)
|
|
153
|
+
const quote = await quoter.quoteClawnchToken(targetToken, sellAmount, direction);
|
|
154
|
+
// Also try 0x quote for comparison if available
|
|
155
|
+
let comparison = '';
|
|
156
|
+
try {
|
|
157
|
+
const swapper = new ClawnchSwapper({
|
|
158
|
+
wallet: walletClient,
|
|
159
|
+
publicClient: publicClient,
|
|
160
|
+
network: 'mainnet',
|
|
161
|
+
});
|
|
162
|
+
const zxPrice = await swapper.getPrice({
|
|
163
|
+
sellToken: tokenIn,
|
|
164
|
+
buyToken: tokenOut,
|
|
165
|
+
sellAmount,
|
|
166
|
+
slippageBps: slippageBps,
|
|
167
|
+
});
|
|
168
|
+
const zxOutput = formatEther(zxPrice.buyAmount);
|
|
169
|
+
const v4Output = formatEther(quote.quotedAmount);
|
|
170
|
+
const diff = ((Number(v4Output) - Number(zxOutput)) / Number(zxOutput) * 100);
|
|
171
|
+
comparison = `\n0x quote: ${zxOutput} (${diff > 0 ? '+' : ''}${diff.toFixed(2)}% vs V4)`;
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
// 0x comparison is best-effort
|
|
175
|
+
}
|
|
176
|
+
const lines = [
|
|
177
|
+
`Uniswap V4 Quote (on-chain, Clawnch-aware):`,
|
|
178
|
+
`Quoted output: ${formatEther(quote.quotedAmount)}`,
|
|
179
|
+
`Price impact: ${quote.priceImpact !== null ? `${(quote.priceImpact * 100).toFixed(3)}%` : 'unknown'}`,
|
|
180
|
+
`Gas estimate: ${quote.gasEstimate.toString()}`,
|
|
181
|
+
`Hook: ${quote.poolKey.hooks}`,
|
|
182
|
+
comparison,
|
|
183
|
+
].filter(Boolean);
|
|
184
|
+
return {
|
|
185
|
+
callId: '',
|
|
186
|
+
success: true,
|
|
187
|
+
result: lines.join('\n'),
|
|
188
|
+
metadata: {
|
|
189
|
+
quoteAmount: quote.quotedAmount.toString(),
|
|
190
|
+
priceImpact: quote.priceImpact,
|
|
191
|
+
hookAddress: quote.poolKey.hooks,
|
|
192
|
+
isClawnchToken: quote.poolKey.hooks !== '0x0000000000000000000000000000000000000000',
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
if (action === 'swap') {
|
|
197
|
+
if (!apiKey) {
|
|
198
|
+
return {
|
|
199
|
+
callId: '',
|
|
200
|
+
success: false,
|
|
201
|
+
result: null,
|
|
202
|
+
error: 'UNISWAP_API_KEY required for swap execution via Trading API. ' +
|
|
203
|
+
'Use action="quote" for on-chain price checks, or set the env var.',
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
const trading = new UniswapTradingApi({
|
|
207
|
+
wallet: walletClient,
|
|
208
|
+
publicClient: publicClient,
|
|
209
|
+
chainId,
|
|
210
|
+
apiKey,
|
|
211
|
+
slippageBps,
|
|
212
|
+
});
|
|
213
|
+
const result = await trading.swap({
|
|
214
|
+
tokenIn,
|
|
215
|
+
tokenOut,
|
|
216
|
+
amount: sellAmount,
|
|
217
|
+
});
|
|
218
|
+
const chain = getUniswapChain(chainId);
|
|
219
|
+
const lines = [
|
|
220
|
+
`Uniswap V4 swap complete!`,
|
|
221
|
+
`Sold: ${amountStr}`,
|
|
222
|
+
`Received: ${formatEther(result.quoteAmount)} (quoted)`,
|
|
223
|
+
`TX: ${result.txHash}`,
|
|
224
|
+
`Gas used: ${result.gasUsed.toString()}`,
|
|
225
|
+
`Explorer: ${chain?.explorer}/tx/${result.txHash}`,
|
|
226
|
+
];
|
|
227
|
+
// Structured metadata for trade recording in handleSkillSideEffects
|
|
228
|
+
const isETHSell = tokenIn === NATIVE_TOKEN_ADDRESS || params.tokenIn.toUpperCase() === 'ETH';
|
|
229
|
+
const isETHBuy = tokenOut === NATIVE_TOKEN_ADDRESS || params.tokenOut.toUpperCase() === 'ETH';
|
|
230
|
+
return {
|
|
231
|
+
callId: '',
|
|
232
|
+
success: true,
|
|
233
|
+
result: lines.join('\n'),
|
|
234
|
+
metadata: {
|
|
235
|
+
txHash: result.txHash,
|
|
236
|
+
quoteAmount: result.quoteAmount.toString(),
|
|
237
|
+
gasUsed: result.gasUsed.toString(),
|
|
238
|
+
// Trade recording fields (consumed by agent heartbeat)
|
|
239
|
+
trade: {
|
|
240
|
+
sellToken: params.tokenIn,
|
|
241
|
+
buyToken: params.tokenOut,
|
|
242
|
+
sellAmount: amountStr,
|
|
243
|
+
buyAmount: formatEther(result.quoteAmount),
|
|
244
|
+
isETHSell,
|
|
245
|
+
isETHBuy,
|
|
246
|
+
source: 'uniswap_v4',
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
return {
|
|
252
|
+
callId: '',
|
|
253
|
+
success: false,
|
|
254
|
+
result: null,
|
|
255
|
+
error: `Unknown action "${action}". Use "swap", "quote", or "deeplink".`,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
catch (err) {
|
|
259
|
+
return {
|
|
260
|
+
callId: '',
|
|
261
|
+
success: false,
|
|
262
|
+
result: null,
|
|
263
|
+
error: err instanceof Error ? err.message : String(err),
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
//# sourceMappingURL=uniswap-swap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uniswap-swap.js","sourceRoot":"","sources":["../../src/skills/uniswap-swap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,eAAe,EACf,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,WAAW,EAA6B,MAAM,MAAM,CAAC;AAG1E,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,IAAI,EAAE,cAAc;IACpB,WAAW,EACT,8DAA8D;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AS;4BACT,QAAQ;4BACR,MAAM,EAAE,YAAY;yBACrB;qBACF;iBACF,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,MAAM,EAAE,EAAE;gBACV,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,IAAI;gBACZ,KAAK,EAAE,mBAAmB,MAAM,wCAAwC;aACzE,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,MAAM,EAAE,EAAE;gBACV,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,IAAI;gBACZ,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACxD,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clawnch/clawtomaton",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Clawtomaton — Autonomous AI agents that launch and manage crypto projects on Base",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"node": ">=18"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@clawnch/clawncher-sdk": "^0.
|
|
47
|
+
"@clawnch/clawncher-sdk": "^0.3.0",
|
|
48
48
|
"@xmtp/agent-sdk": "^2.2.0",
|
|
49
49
|
"better-sqlite3": "^11.0.0",
|
|
50
50
|
"viem": "^2.0.0"
|