web3-tools-mcp 1.3.4 → 1.4.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 +51 -4
- package/dist/anvil.d.ts +34 -0
- package/dist/anvil.d.ts.map +1 -0
- package/dist/anvil.js +254 -0
- package/dist/anvil.js.map +1 -0
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +11 -0
- package/dist/client.js.map +1 -1
- package/dist/index.js +25 -5
- package/dist/index.js.map +1 -1
- package/dist/preview.d.ts +55 -0
- package/dist/preview.d.ts.map +1 -0
- package/dist/preview.js +233 -0
- package/dist/preview.js.map +1 -0
- package/dist/tools/advanced.d.ts +67 -9
- package/dist/tools/advanced.d.ts.map +1 -1
- package/dist/tools/advanced.js +206 -67
- package/dist/tools/advanced.js.map +1 -1
- package/dist/tools/balance.d.ts +5 -5
- package/dist/tools/contract-info.d.ts +9 -9
- package/dist/tools/contract.d.ts +8 -8
- package/dist/tools/ens.d.ts +15 -15
- package/dist/tools/gas.d.ts +18 -18
- package/dist/tools/logs.d.ts +3 -3
- package/dist/tools/transactions.d.ts +9 -9
- package/dist/tools/transactions.d.ts.map +1 -1
- package/dist/tools/transactions.js +92 -113
- package/dist/tools/transactions.js.map +1 -1
- package/dist/utils.d.ts +13 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +76 -0
- package/dist/utils.js.map +1 -1
- package/dist/wallet-client.d.ts +83 -0
- package/dist/wallet-client.d.ts.map +1 -0
- package/dist/wallet-client.js +357 -0
- package/dist/wallet-client.js.map +1 -0
- package/package.json +9 -8
- package/src/anvil.ts +323 -0
- package/src/client.ts +14 -0
- package/src/index.ts +26 -5
- package/src/preview.ts +320 -0
- package/src/tools/advanced.ts +239 -70
- package/src/tools/transactions.ts +98 -125
- package/src/utils.ts +95 -0
- package/src/wallet-client.ts +380 -0
- package/dist/wallet-server.d.ts +0 -35
- package/dist/wallet-server.d.ts.map +0 -1
- package/dist/wallet-server.js +0 -232
- package/dist/wallet-server.js.map +0 -1
- package/public/wallet-app.js +0 -677
- package/public/wallet.html +0 -723
- package/src/wallet-server.ts +0 -283
package/dist/preview.js
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { decodeFunctionData, formatEther, formatUnits, parseAbiItem, toFunctionSelector } from 'viem';
|
|
2
|
+
import { simulateBlocks } from 'viem/actions';
|
|
3
|
+
import { whatsabi } from '@shazow/whatsabi';
|
|
4
|
+
import { getClientManager } from './client.js';
|
|
5
|
+
const ERC20_META_ABI = [
|
|
6
|
+
parseAbiItem('function decimals() view returns (uint8)'),
|
|
7
|
+
parseAbiItem('function symbol() view returns (string)')
|
|
8
|
+
];
|
|
9
|
+
const TRANSFER_TOPIC = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef';
|
|
10
|
+
const MAX_UINT256 = (1n << 256n) - 1n;
|
|
11
|
+
const UNLIMITED_THRESHOLD = MAX_UINT256 / 2n;
|
|
12
|
+
// Selectors whose amount argument is denominated in the token at tx.to.
|
|
13
|
+
const ERC20_AMOUNT_ARGS = {
|
|
14
|
+
[toFunctionSelector('function approve(address,uint256)')]: { arg: 'amount', approval: true },
|
|
15
|
+
[toFunctionSelector('function transfer(address,uint256)')]: { arg: 'amount' },
|
|
16
|
+
[toFunctionSelector('function transferFrom(address,address,uint256)')]: { arg: 'amount' }
|
|
17
|
+
};
|
|
18
|
+
const abiCache = new Map();
|
|
19
|
+
const labelCache = new Map();
|
|
20
|
+
const metaCache = new Map();
|
|
21
|
+
async function loadAbi(chain, address) {
|
|
22
|
+
const key = `${chain}:${address.toLowerCase()}`;
|
|
23
|
+
const cached = abiCache.get(key);
|
|
24
|
+
if (cached)
|
|
25
|
+
return cached;
|
|
26
|
+
const clientManager = getClientManager();
|
|
27
|
+
const client = clientManager.getClient(chain);
|
|
28
|
+
const etherscanApiKey = clientManager.getConfig().etherscanApiKey;
|
|
29
|
+
const loaders = [new whatsabi.loaders.SourcifyABILoader({ chainId: clientManager.getChainId(chain) })];
|
|
30
|
+
if (etherscanApiKey) {
|
|
31
|
+
loaders.push(new whatsabi.loaders.EtherscanV2ABILoader({ apiKey: etherscanApiKey, chainId: clientManager.getChainId(chain) }));
|
|
32
|
+
}
|
|
33
|
+
const result = await whatsabi.autoload(address, {
|
|
34
|
+
provider: client,
|
|
35
|
+
abiLoader: new whatsabi.loaders.MultiABILoader(loaders),
|
|
36
|
+
signatureLookup: new whatsabi.loaders.OpenChainSignatureLookup(),
|
|
37
|
+
followProxies: true
|
|
38
|
+
});
|
|
39
|
+
// Bytecode-guessed ABIs carry no argument names; verified ones do.
|
|
40
|
+
const source = result.abi.some((item) => item.type === 'function' && item.inputs?.some((i) => i.name)) ? 'verified' : 'guessed';
|
|
41
|
+
const loaded = {
|
|
42
|
+
abi: result.abi,
|
|
43
|
+
source: source,
|
|
44
|
+
proxy: result.address !== address ? result.address : undefined,
|
|
45
|
+
name: result.contractResult?.name ?? undefined
|
|
46
|
+
};
|
|
47
|
+
abiCache.set(key, loaded);
|
|
48
|
+
return loaded;
|
|
49
|
+
}
|
|
50
|
+
async function tokenMeta(chain, token) {
|
|
51
|
+
const key = `${chain}:${token.toLowerCase()}`;
|
|
52
|
+
const cached = metaCache.get(key);
|
|
53
|
+
if (cached)
|
|
54
|
+
return cached;
|
|
55
|
+
const client = getClientManager().getClient(chain);
|
|
56
|
+
const [decimals, symbol] = await client.multicall({
|
|
57
|
+
contracts: [
|
|
58
|
+
{ address: token, abi: ERC20_META_ABI, functionName: 'decimals' },
|
|
59
|
+
{ address: token, abi: ERC20_META_ABI, functionName: 'symbol' }
|
|
60
|
+
],
|
|
61
|
+
...(chain === 'localhost' && { deployless: true })
|
|
62
|
+
});
|
|
63
|
+
const meta = {
|
|
64
|
+
decimals: decimals.status === 'success' ? Number(decimals.result) : undefined,
|
|
65
|
+
symbol: symbol.status === 'success' ? symbol.result : undefined
|
|
66
|
+
};
|
|
67
|
+
metaCache.set(key, meta);
|
|
68
|
+
return meta;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Human label for an address: token symbol first (more recognisable than the contract
|
|
72
|
+
* name — "USDC" beats "FiatTokenProxy"), then the verified contract name. EOAs get none,
|
|
73
|
+
* and the bytecode check keeps us from asking explorers about plain wallets.
|
|
74
|
+
*/
|
|
75
|
+
async function addressLabel(chain, address) {
|
|
76
|
+
const key = `${chain}:${address.toLowerCase()}`;
|
|
77
|
+
if (labelCache.has(key))
|
|
78
|
+
return labelCache.get(key);
|
|
79
|
+
let label;
|
|
80
|
+
try {
|
|
81
|
+
const code = await getClientManager().getClient(chain).getBytecode({ address: address });
|
|
82
|
+
if (code && code !== '0x') {
|
|
83
|
+
label = (await tokenMeta(chain, address).catch(() => ({ symbol: undefined }))).symbol;
|
|
84
|
+
if (!label)
|
|
85
|
+
label = (await loadAbi(chain, address)).name;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
// Unknown address — show it bare rather than failing the preview.
|
|
90
|
+
}
|
|
91
|
+
labelCache.set(key, label);
|
|
92
|
+
return label;
|
|
93
|
+
}
|
|
94
|
+
function stringify(value) {
|
|
95
|
+
if (typeof value === 'bigint')
|
|
96
|
+
return value.toString();
|
|
97
|
+
if (Array.isArray(value))
|
|
98
|
+
return `[${value.map(stringify).join(', ')}]`;
|
|
99
|
+
if (value && typeof value === 'object') {
|
|
100
|
+
return `{${Object.entries(value)
|
|
101
|
+
.map(([k, v]) => `${k}: ${stringify(v)}`)
|
|
102
|
+
.join(', ')}}`;
|
|
103
|
+
}
|
|
104
|
+
return String(value);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Decode calldata into labelled fields (clear signing). Token amounts on the standard
|
|
108
|
+
* ERC20 selectors are formatted with on-chain decimals and unlimited approvals flagged.
|
|
109
|
+
*/
|
|
110
|
+
async function decodeCalldata(chain, tx) {
|
|
111
|
+
if (!tx.data || tx.data === '0x')
|
|
112
|
+
return undefined;
|
|
113
|
+
const { abi, source, proxy } = await loadAbi(chain, tx.to);
|
|
114
|
+
const { functionName, args } = decodeFunctionData({ abi, data: tx.data });
|
|
115
|
+
const abiItem = abi.find((item) => item.type === 'function' && item.name === functionName);
|
|
116
|
+
const inputs = abiItem?.inputs ?? [];
|
|
117
|
+
const erc20 = ERC20_AMOUNT_ARGS[tx.data.slice(0, 10)];
|
|
118
|
+
const meta = erc20 ? await tokenMeta(chain, tx.to).catch(() => ({ symbol: undefined, decimals: undefined })) : undefined;
|
|
119
|
+
const fields = (args ?? []).map((value, i) => {
|
|
120
|
+
const input = inputs[i];
|
|
121
|
+
const name = input?.name || `arg${i}`;
|
|
122
|
+
const field = { name, type: input?.type ?? 'unknown', value: stringify(value) };
|
|
123
|
+
if (input?.type === 'address' && typeof value === 'string')
|
|
124
|
+
field.address = value;
|
|
125
|
+
// Amount argument is positionally last on all three ERC20 selectors.
|
|
126
|
+
if (erc20 && i === args.length - 1 && typeof value === 'bigint') {
|
|
127
|
+
if (meta?.decimals !== undefined) {
|
|
128
|
+
field.value = `${formatUnits(value, meta.decimals)}${meta.symbol ? ` ${meta.symbol}` : ''}`;
|
|
129
|
+
}
|
|
130
|
+
if (erc20.approval && value > UNLIMITED_THRESHOLD) {
|
|
131
|
+
field.value = `Unlimited${meta?.symbol ? ` ${meta.symbol}` : ''}`;
|
|
132
|
+
field.warning = 'Unlimited spending approval';
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return field;
|
|
136
|
+
});
|
|
137
|
+
// Label every address argument at once rather than serially per field.
|
|
138
|
+
await Promise.all(fields
|
|
139
|
+
.filter((field) => field.address)
|
|
140
|
+
.map(async (field) => {
|
|
141
|
+
field.label = await addressLabel(chain, field.address);
|
|
142
|
+
}));
|
|
143
|
+
const signature = abiItem
|
|
144
|
+
? `${functionName}(${inputs.map((i) => `${i.type}${i.name ? ` ${i.name}` : ''}`).join(', ')})`
|
|
145
|
+
: functionName;
|
|
146
|
+
return { functionName, signature, fields, source, proxy };
|
|
147
|
+
}
|
|
148
|
+
function topicToAddress(topic) {
|
|
149
|
+
return `0x${topic.slice(-40)}`;
|
|
150
|
+
}
|
|
151
|
+
async function enrichTransfers(chain, logs) {
|
|
152
|
+
const transfers = logs.filter((log) => log.topics[0]?.toLowerCase() === TRANSFER_TOPIC && log.topics.length >= 3);
|
|
153
|
+
return Promise.all(transfers.map(async (log) => {
|
|
154
|
+
const amount = log.data && log.data !== '0x' ? BigInt(log.data).toString() : '0';
|
|
155
|
+
const meta = await tokenMeta(chain, log.address).catch(() => ({ symbol: undefined, decimals: undefined }));
|
|
156
|
+
return {
|
|
157
|
+
token: log.address,
|
|
158
|
+
symbol: meta.symbol,
|
|
159
|
+
decimals: meta.decimals,
|
|
160
|
+
from: topicToAddress(log.topics[1]),
|
|
161
|
+
to: topicToAddress(log.topics[2]),
|
|
162
|
+
amount,
|
|
163
|
+
humanAmount: meta.decimals !== undefined ? formatUnits(BigInt(amount), meta.decimals) : undefined
|
|
164
|
+
};
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Simulate a transaction without broadcasting.
|
|
169
|
+
*
|
|
170
|
+
* Prefers eth_simulateV1 (viem `simulateBlocks`) for the ERC20 transfer logs it returns,
|
|
171
|
+
* falling back to eth_call + estimateGas on RPCs that don't implement it.
|
|
172
|
+
*/
|
|
173
|
+
async function simulate(chain, tx, from) {
|
|
174
|
+
const client = getClientManager().getClient(chain);
|
|
175
|
+
const call = {
|
|
176
|
+
account: from,
|
|
177
|
+
to: tx.to,
|
|
178
|
+
...(tx.data && { data: tx.data }),
|
|
179
|
+
...(tx.value && BigInt(tx.value) > 0n && { value: BigInt(tx.value) })
|
|
180
|
+
};
|
|
181
|
+
try {
|
|
182
|
+
const blocks = await simulateBlocks(client, { blocks: [{ calls: [call] }], traceTransfers: true, validation: false });
|
|
183
|
+
const result = blocks?.[0]?.calls?.[0];
|
|
184
|
+
if (result) {
|
|
185
|
+
const error = result.error;
|
|
186
|
+
return {
|
|
187
|
+
success: result.status === 'success',
|
|
188
|
+
gasEstimate: result.gasUsed?.toString(),
|
|
189
|
+
error: result.status === 'success' ? undefined : (error?.shortMessage ?? error?.message ?? 'execution reverted'),
|
|
190
|
+
assetChanges: await enrichTransfers(chain, (result.logs ?? []))
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
catch {
|
|
195
|
+
// RPC lacks eth_simulateV1 — fall through
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
await client.call(call);
|
|
199
|
+
const gas = await client.estimateGas(call);
|
|
200
|
+
return { success: true, gasEstimate: gas.toString(), assetChanges: [] };
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
return {
|
|
204
|
+
success: false,
|
|
205
|
+
error: error instanceof Error ? error.message.slice(0, 500) : String(error),
|
|
206
|
+
assetChanges: []
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Build the human-readable preview shown in the wallet before signing: decoded calldata
|
|
212
|
+
* plus a simulation of the outcome. Never throws — a preview that cannot be built is
|
|
213
|
+
* reported as missing rather than blocking the transaction.
|
|
214
|
+
*/
|
|
215
|
+
export async function buildTxPreview(chain, tx, from) {
|
|
216
|
+
const value = tx.value ? BigInt(tx.value).toString() : undefined;
|
|
217
|
+
const [decoded, simulation, toLabel] = await Promise.all([
|
|
218
|
+
decodeCalldata(chain, tx).catch(() => undefined),
|
|
219
|
+
from ? simulate(chain, tx, from).catch(() => undefined) : Promise.resolve(undefined),
|
|
220
|
+
addressLabel(chain, tx.to).catch(() => undefined)
|
|
221
|
+
]);
|
|
222
|
+
return {
|
|
223
|
+
chain,
|
|
224
|
+
to: tx.to,
|
|
225
|
+
toLabel,
|
|
226
|
+
explorer: `https://${getClientManager().getEtherscanDomain(chain)}`,
|
|
227
|
+
value,
|
|
228
|
+
valueFormatted: value && value !== '0' ? formatEther(BigInt(value)) : undefined,
|
|
229
|
+
decoded,
|
|
230
|
+
simulation
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
//# sourceMappingURL=preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../src/preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,kBAAkB,EACnB,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAsD9C,MAAM,cAAc,GAAG;IACrB,YAAY,CAAC,0CAA0C,CAAC;IACxD,YAAY,CAAC,yCAAyC,CAAC;CACxD,CAAA;AAED,MAAM,cAAc,GAAG,oEAAoE,CAAA;AAC3F,MAAM,WAAW,GAAG,CAAC,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE,CAAA;AACrC,MAAM,mBAAmB,GAAG,WAAW,GAAG,EAAE,CAAA;AAE5C,wEAAwE;AACxE,MAAM,iBAAiB,GAAwD;IAC7E,CAAC,kBAAkB,CAAC,mCAAmC,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC5F,CAAC,kBAAkB,CAAC,oCAAoC,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE;IAC7E,CAAC,kBAAkB,CAAC,gDAAgD,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE;CAC1F,CAAA;AAED,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAuF,CAAA;AAC/G,MAAM,UAAU,GAAG,IAAI,GAAG,EAA8B,CAAA;AACxD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAkD,CAAA;AAE3E,KAAK,UAAU,OAAO,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AS,CAAC;KAClD,CAAC,CAAA;IAEF,OAAO;QACL,KAAK;QACL,EAAE,EAAE,EAAE,CAAC,EAAE;QACT,OAAO;QACP,QAAQ,EAAE,WAAW,gBAAgB,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE;QACnE,KAAK;QACL,cAAc,EAAE,KAAK,IAAI,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;QAC/E,OAAO;QACP,UAAU;KACX,CAAA;AACH,CAAC"}
|
package/dist/tools/advanced.d.ts
CHANGED
|
@@ -10,21 +10,21 @@ declare const _default: {
|
|
|
10
10
|
abiType: z.ZodString;
|
|
11
11
|
blockNumber: z.ZodOptional<z.ZodString>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
chain: "mainnet" | "arbitrum" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
14
13
|
address: string;
|
|
14
|
+
chain: "arbitrum" | "mainnet" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
15
15
|
slot: string;
|
|
16
16
|
abiType: string;
|
|
17
17
|
blockNumber?: string | undefined;
|
|
18
18
|
}, {
|
|
19
|
-
chain: "mainnet" | "arbitrum" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
20
19
|
address: string;
|
|
20
|
+
chain: "arbitrum" | "mainnet" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
21
21
|
slot: string;
|
|
22
22
|
abiType: string;
|
|
23
23
|
blockNumber?: string | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
handler: (args: {
|
|
26
|
-
chain: "mainnet" | "arbitrum" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
27
26
|
address: string;
|
|
27
|
+
chain: "arbitrum" | "mainnet" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
28
28
|
slot: string;
|
|
29
29
|
abiType: string;
|
|
30
30
|
blockNumber?: string | undefined;
|
|
@@ -37,14 +37,14 @@ declare const _default: {
|
|
|
37
37
|
chain: z.ZodEnum<["mainnet", "arbitrum", "avalanche", "base", "bnb", "gnosis", "sonic", "optimism", "polygon", "zksync", "linea", "unichain", "localhost"]>;
|
|
38
38
|
blockNumber: z.ZodOptional<z.ZodString>;
|
|
39
39
|
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
chain: "
|
|
40
|
+
chain: "arbitrum" | "mainnet" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
41
41
|
blockNumber?: string | undefined;
|
|
42
42
|
}, {
|
|
43
|
-
chain: "
|
|
43
|
+
chain: "arbitrum" | "mainnet" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
44
44
|
blockNumber?: string | undefined;
|
|
45
45
|
}>;
|
|
46
46
|
handler: (args: {
|
|
47
|
-
chain: "
|
|
47
|
+
chain: "arbitrum" | "mainnet" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
48
48
|
blockNumber?: string | undefined;
|
|
49
49
|
}) => Promise<import("../types.js").ToolResult>;
|
|
50
50
|
};
|
|
@@ -55,19 +55,77 @@ declare const _default: {
|
|
|
55
55
|
chain: z.ZodEnum<["mainnet", "arbitrum", "avalanche", "base", "bnb", "gnosis", "sonic", "optimism", "polygon", "zksync", "linea", "unichain", "localhost"]>;
|
|
56
56
|
transactionHash: z.ZodString;
|
|
57
57
|
traceType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["trace", "vmTrace", "stateDiff"]>>>;
|
|
58
|
+
useAnvil: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
59
|
+
summarize: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
58
60
|
}, "strip", z.ZodTypeAny, {
|
|
59
|
-
chain: "
|
|
61
|
+
chain: "arbitrum" | "mainnet" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
60
62
|
transactionHash: string;
|
|
61
63
|
traceType: "trace" | "vmTrace" | "stateDiff";
|
|
64
|
+
useAnvil: boolean;
|
|
65
|
+
summarize: boolean;
|
|
62
66
|
}, {
|
|
63
|
-
chain: "
|
|
67
|
+
chain: "arbitrum" | "mainnet" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
64
68
|
transactionHash: string;
|
|
65
69
|
traceType?: "trace" | "vmTrace" | "stateDiff" | undefined;
|
|
70
|
+
useAnvil?: boolean | undefined;
|
|
71
|
+
summarize?: boolean | undefined;
|
|
66
72
|
}>;
|
|
67
73
|
handler: (args: {
|
|
68
|
-
chain: "
|
|
74
|
+
chain: "arbitrum" | "mainnet" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
69
75
|
transactionHash: string;
|
|
70
76
|
traceType: "trace" | "vmTrace" | "stateDiff";
|
|
77
|
+
useAnvil: boolean;
|
|
78
|
+
summarize: boolean;
|
|
79
|
+
}) => Promise<import("../types.js").ToolResult>;
|
|
80
|
+
};
|
|
81
|
+
debug_call: {
|
|
82
|
+
title: string;
|
|
83
|
+
description: string;
|
|
84
|
+
schema: z.ZodObject<{
|
|
85
|
+
chain: z.ZodEnum<["mainnet", "arbitrum", "avalanche", "base", "bnb", "gnosis", "sonic", "optimism", "polygon", "zksync", "linea", "unichain", "localhost"]>;
|
|
86
|
+
to: z.ZodString;
|
|
87
|
+
data: z.ZodOptional<z.ZodString>;
|
|
88
|
+
functionAbi: z.ZodOptional<z.ZodString>;
|
|
89
|
+
args: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
|
|
90
|
+
from: z.ZodOptional<z.ZodString>;
|
|
91
|
+
value: z.ZodOptional<z.ZodString>;
|
|
92
|
+
blockNumber: z.ZodOptional<z.ZodString>;
|
|
93
|
+
traceType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["callTracer", "prestateTracer"]>>>;
|
|
94
|
+
summarize: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
chain: "arbitrum" | "mainnet" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
97
|
+
to: string;
|
|
98
|
+
traceType: "callTracer" | "prestateTracer";
|
|
99
|
+
summarize: boolean;
|
|
100
|
+
data?: string | undefined;
|
|
101
|
+
from?: string | undefined;
|
|
102
|
+
value?: string | undefined;
|
|
103
|
+
blockNumber?: string | undefined;
|
|
104
|
+
args?: (string | number | boolean)[] | undefined;
|
|
105
|
+
functionAbi?: string | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
chain: "arbitrum" | "mainnet" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
108
|
+
to: string;
|
|
109
|
+
data?: string | undefined;
|
|
110
|
+
from?: string | undefined;
|
|
111
|
+
value?: string | undefined;
|
|
112
|
+
blockNumber?: string | undefined;
|
|
113
|
+
args?: (string | number | boolean)[] | undefined;
|
|
114
|
+
traceType?: "callTracer" | "prestateTracer" | undefined;
|
|
115
|
+
summarize?: boolean | undefined;
|
|
116
|
+
functionAbi?: string | undefined;
|
|
117
|
+
}>;
|
|
118
|
+
handler: (args: {
|
|
119
|
+
chain: "arbitrum" | "mainnet" | "avalanche" | "base" | "bnb" | "gnosis" | "sonic" | "optimism" | "polygon" | "zksync" | "linea" | "unichain" | "localhost";
|
|
120
|
+
to: string;
|
|
121
|
+
traceType: "callTracer" | "prestateTracer";
|
|
122
|
+
summarize: boolean;
|
|
123
|
+
data?: string | undefined;
|
|
124
|
+
from?: string | undefined;
|
|
125
|
+
value?: string | undefined;
|
|
126
|
+
blockNumber?: string | undefined;
|
|
127
|
+
args?: (string | number | boolean)[] | undefined;
|
|
128
|
+
functionAbi?: string | undefined;
|
|
71
129
|
}) => Promise<import("../types.js").ToolResult>;
|
|
72
130
|
};
|
|
73
131
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanced.d.ts","sourceRoot":"","sources":["../../src/tools/advanced.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA
|
|
1
|
+
{"version":3,"file":"advanced.d.ts","sourceRoot":"","sources":["../../src/tools/advanced.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUvB,wBAmaC"}
|