You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
network: z.string().optional().describe("Network name. Defaults to Ethereum mainnet.")
40
72
}
41
73
},
42
74
({ txHash, network ="ethereum"})=>({
43
75
messages: [{
44
76
role: "user",
45
77
content: {
46
78
type: "text",
47
-
text: `Please analyze transaction ${txHash} on the ${network} network and provide a detailed explanation of what this transaction does, who the parties involved are, the amount transferred (if applicable), gas used, and any other relevant information.`
79
+
text: `Please diagnose this transaction: ${txHash} on ${network}
80
+
81
+
Follow these steps:
82
+
1. Call get_transaction to get the transaction details
83
+
2. Call get_transaction_receipt to check the status and gas used
84
+
3. Analyze what went wrong or what the transaction is doing
85
+
4. If it failed:
86
+
- Check if it was out of gas
87
+
- Check if it was a contract revert
88
+
- Look at the gas limit vs gas used
89
+
5. Provide:
90
+
- Current status (pending/confirmed/failed)
91
+
- Why it failed (if applicable)
92
+
- Gas analysis
93
+
- Recommended next steps
94
+
95
+
Be specific about the issues and provide actionable solutions.`
text: `Please analyze the address ${address} on the ${network} network. Provide information about its balance, transaction count, and any other relevant information you can find.`
122
+
text: `Please analyze the wallet ${address} on ${network}:
123
+
124
+
1. Call resolve_ens_name if the input looks like an ENS name, otherwise use it as an address
125
+
2. Call get_balance to get the native token balance
126
+
3. If tokens are specified, call get_token_balance for each token to show holdings
127
+
4. Provide a summary with:
128
+
- Wallet address and ENS name (if any)
129
+
- Native token balance (in both wei and ether)
130
+
- Token holdings (if checked)
131
+
- Overall asset overview
132
+
133
+
Format the results in a clear, readable way. If the wallet has no balance, let the user know.`
134
+
}
135
+
}]
136
+
};
137
+
}
138
+
);
139
+
140
+
server.registerPrompt(
141
+
"audit_approvals",
142
+
{
143
+
description: "Review token approvals for a wallet and identify security risks",
144
+
argsSchema: {
145
+
address: z.string().optional().describe("Wallet address to audit (defaults to configured wallet)"),
146
+
tokenAddress: z.string().describe("ERC20 token contract address to check approvals for"),
147
+
network: z.string().optional().describe("Network name. Defaults to Ethereum mainnet.")
? `I need to interact with the smart contract at address ${contractAddress} on the ${network} network. Here's the ABI:\n\n${abiJson}\n\nPlease analyze this contract's functions and provide guidance on how to interact with it safely.`
92
-
: `I need to interact with the smart contract at address ${contractAddress} on the ${network} network. Please help me understand what this contract does and how I can interact with it safely.`
192
+
text: `Please explore the smart contract at ${contractAddress} on ${network}:
193
+
194
+
1. This is a read-only exploration - no transactions will be executed
195
+
2. Identify what type of contract this is (token, NFT, DEX, lending, etc.)
196
+
3. Try to read common functions that might exist:
197
+
- For tokens: name(), symbol(), decimals(), totalSupply()
198
+
- For NFTs: name(), symbol(), totalSupply()
199
+
- For other contracts: relevant state functions
200
+
4. Use read_contract to call these functions
201
+
5. Provide a summary with:
202
+
- Contract type and purpose (best guess)
203
+
- Key properties discovered
204
+
- Security notes (if applicable)
205
+
- Next steps for interacting with it
206
+
207
+
Be clear about what you were able to discover and what remains unknown.`
93
208
}
94
209
}]
95
210
})
96
211
);
97
212
98
-
// EVM concept explanation
99
213
server.registerPrompt(
100
214
"explain_evm_concept",
101
215
{
102
-
description: "Get an explanation of an EVM concept",
216
+
description: "Get an explanation of an EVM or blockchain concept",
103
217
argsSchema: {
104
-
concept: z.string().describe("The EVM concept to explain (e.g., gas, nonce, etc.)")
text: `Please explain the EVM Blockchain concept of "${concept}" in detail. Include how it works, why it's important, and provide examples if applicable.`
226
+
text: `Please explain the blockchain/EVM concept: "${concept}"
227
+
228
+
In your explanation:
229
+
1. Define what it is in simple terms
230
+
2. Explain why it matters
231
+
3. Give practical examples
232
+
4. Explain how it affects using blockchain applications
233
+
5. If relevant, mention how to check or monitor it on the blockchain
234
+
235
+
Make it accessible for someone new to blockchain but interested in using EVM networks.`
text: `Please compare the following EVM-compatible networks: ${networks.join(', ')}. Include information about their architecture, gas fees, transaction speed, security, and any other relevant differences.`
135
-
}
136
-
}]
256
+
messages: [{
257
+
role: "user",
258
+
content: {
259
+
type: "text",
260
+
text: `Please compare these EVM networks: ${networkList.join(", ")}
261
+
262
+
For each network:
263
+
1. Call get_chain_info to get current chain ID and block number
264
+
2. Call get_gas_price to understand current gas costs
265
+
3. Provide comparison across:
266
+
- Chain characteristics (mainnet, testnet, etc.)
267
+
- Current gas prices
268
+
- Block time and finality
269
+
- Typical use cases and advantages
270
+
- Any known limitations or risks
271
+
4. Provide a recommendation for which network to use based on:
272
+
- Transaction speed needs
273
+
- Cost considerations
274
+
- Ecosystem size and liquidity
275
+
- Security considerations
276
+
277
+
Make the comparison easy to understand for someone deciding which network to use.`
278
+
}
279
+
}]
137
280
};
138
281
}
139
282
);
140
283
141
-
// Token analysis prompt
142
284
server.registerPrompt(
143
-
"analyze_token",
285
+
"check_network_status",
144
286
{
145
-
description: "Analyze an ERC20 or NFT token",
287
+
description: "Check the current status and health of an EVM network",
146
288
argsSchema: {
147
-
tokenAddress: z.string().describe("Token contract address to analyze"),
148
-
tokenType: z.string().optional().describe("Type of token (erc20, erc721/nft, or auto-detect)"),
149
-
tokenId: z.string().optional().describe("Token ID (required for NFT analysis)"),
150
-
network: z.string().optional().describe("Network name or chain ID. Defaults to Ethereum mainnet.")
289
+
network: z.string().optional().describe("Network name. Defaults to Ethereum mainnet.")
promptText=`Please analyze the ERC20 token at address ${tokenAddress} on the ${network} network. Provide information about its name, symbol, total supply, and any other relevant details.`;
promptText=`Please analyze the NFT with token ID ${tokenId} from the collection at address ${tokenAddress} on the ${network} network. Provide information about the collection name, token details, and any other relevant information.`;
160
-
}elseif(tokenType==="nft"||tokenType==="erc721"){
161
-
promptText=`Please analyze the NFT collection at address ${tokenAddress} on the ${network} network. Provide information about the collection name, symbol, total supply if available, and any other relevant details.`;
162
-
}
292
+
({ network ="ethereum"})=>({
293
+
messages: [{
294
+
role: "user",
295
+
content: {
296
+
type: "text",
297
+
text: `Please check the current status of the ${network} network:
163
298
164
-
return{
165
-
messages: [{
166
-
role: "user",
167
-
content: {
168
-
type: "text",
169
-
text: promptText
170
-
}
171
-
}]
172
-
};
173
-
}
299
+
1. Call get_chain_info to get chain ID, current block number, and RPC info
300
+
2. Call get_latest_block to see recent block information
301
+
3. Call get_gas_price to check current gas prices
302
+
4. Provide a status report with:
303
+
- Network is healthy/operational
304
+
- Current block number and recent block times
305
+
- Current gas prices (base fee and priority fee)
306
+
- Any observations about network congestion
307
+
- Recommendations for transaction timing if applicable
308
+
309
+
Be clear about whether now is a good time to transact on this network.`
0 commit comments