I deploy Solidity contracts on HyperEVM. When the chain first launched in early 2025, the tooling around it was rough.
The indexers couldn't access historical state. Subgraphs broke when you tried to query past blocks. The public RPC was rate-limited to 100 requests per minute. Block explorers showed incomplete data or wrong transaction hashes (a known issue where HyperEVM's S3-based block publishing caused hash mismatches with community tools like nanoreth).
If I needed to investigate a contract — check its state, trace a transaction, understand what some unverified bytecode was doing — I did it the old way.
The old way
Write a script. Call eth_getLogs. Decode calldata manually. Piece it together from whatever fragments the broken tooling gave you.
Something like this:
import { createPublicClient, http, parseAbi } from 'viem';
const client = createPublicClient({
transport: http('https://rpc.hyperliquid.xyz/evm'),
});
// Read contract state manually
const owner = await client.readContract({
address: '0x815687F03D2Bab77Dd25237ae7f28bf599aBc2ee',
abi: parseAbi(['function owner() view returns (address)']),
functionName: 'owner',
});
// Get logs, filter, decode each one, cross-reference...
const logs = await client.getLogs({
address: '0x815687F03D2Bab77Dd25237ae7f28bf599aBc2ee',
fromBlock: 0n,
toBlock: 'latest',
});
// Now you're manually decoding event data, matching selectors,
// figuring out what happened and in what order.
// On a chain where the explorer barely works.
This works if you already know the ABI. If the contract isn't verified (common on new chains), you're looking at raw bytecode and guessing function signatures from 4-byte selectors.
On Ethereum with Etherscan and working indexers? Annoying but manageable. On HyperEVM in early 2025? A full day for one contract.
What changed
AI coding agents (Claude Code, Cursor, etc.) can now use CLI tools directly. Foundry's cast is one of the most useful CLI tools for EVM interaction. Combine the two and you get something that actually works.
Here's what the AI agent runs when I point it at a contract:
# Read bytecode, check if there's anything to work with
cast code 0x815687F03D2Bab77Dd25237ae7f28bf599aBc2ee \
--rpc-url https://rpc.hyperliquid.xyz/evm
# Read storage slots directly (slot 0 is usually owner in Ownable)
cast storage 0x815687F03D2Bab77Dd25237ae7f28bf599aBc2ee 0 \
--rpc-url https://rpc.hyperliquid.xyz/evm
# Call known functions without writing a full script
cast call 0x815687F03D2Bab77Dd25237ae7f28bf599aBc2ee \
"owner()(address)" \
--rpc-url https://rpc.hyperliquid.xyz/evm
# Trace a specific transaction
cast run 0x<txhash> --rpc-url https://rpc.hyperliquid.xyz/evm
# Decode calldata without knowing the ABI
cast 4byte-decode 0x<calldata>
The key: I don't run these myself anymore. I give the agent an address and a question. "What does this contract do?" or "Who can call the withdraw function?" or "Trace the last 5 transactions and tell me where the funds went."
The agent decides what to query, runs the commands, reads the output, runs more queries based on what it found. Thirty to forty calls later, I get a summary.
Five minutes instead of a day.
Setting it up
The tool that makes this work: foundry-mcp-server. It wraps the entire Foundry toolchain (cast, forge, anvil) plus Heimdall (a bytecode decompiler) into MCP tools that any compatible AI agent can use.
If you're on Claude Code:
claude mcp add foundry-mcp-server -- npx @pranesh.asp/foundry-mcp-server
Set your RPC:
export RPC_URL=https://rpc.hyperliquid.xyz/evm
Now your AI agent can read contract state, trace transactions, decode calldata, decompile unverified bytecode, and deploy contracts. All through natural language.
There's also evm-mcp-tools if you want Etherscan and Moralis API integration for chains with decent explorer support.
Where it falls apart
Simple investigation: AI handles it. "What does this contract do?" "Who deployed it?" "What's the token balance at this address?" All fast, all correct.
Medium complexity: AI speeds you up. It does the grunt work (reading storage, tracing calls, decoding events) and gives you a starting point. You take it from there.
Hard stuff: AI hits a wall. Some examples from my own work:
Chain-specific infra bugs. HyperEVM had a phantom hash problem where the block explorer showed different transaction hashes than the official RPC. The cause: nanoreth (a community tool that reads Hyperliquid's S3 block data) encodes system transaction signatures differently from the official node. No AI would figure this out without that context.
Complex proxy patterns. AI can identify that something is a proxy. Understanding the upgrade path and storage layout across multiple implementations still takes manual work.
Business logic with external dependencies. I built a lottery contract that uses Pyth Entropy for on-chain randomness with a specific callback pattern. AI can read the code, but it can't tell you if the Pyth integration handles edge cases correctly without understanding Pyth's callback lifecycle.
Anthropic published a benchmark (EVMbench, March 2026) where the best AI model scored 45.9% on vulnerability detection. When given hints about where to look, that jumped to ~90%. The bottleneck is finding where the problem is, not understanding it.
That tracks with how I use it. Point the AI at something specific and it's fast. Ask it to find issues in a big project with no direction and it struggles.
Is it worth setting up?
Yes. This is the biggest quality-of-life change I've had as a Web3 developer this past year. Not because AI is better at contract analysis than me. But it removes the dumb, repetitive work that used to eat hours.
On newer chains where the tooling hasn't caught up (and on HyperEVM, it still hasn't fully), having an AI agent that queries the RPC directly and makes sense of raw data is the difference between a productive day and a wasted one.
Try it. Point it at a contract you already understand and see if it gets it right. Then point it at something you don't know.
I build DeFi products on Hyperliquid and work as a fullstack Web3 engineer. More at olafkrason.xyz.
Top comments (0)