• TRACE
  • STATE
  • LOGIC
  • HUMAN

How to debug smart contract execution with your AI

Connect Nodereal to your AI client to pull deep execution data from EVM and Aptos chains. Your agent handles the heavy lifting of tracing calls and inspecting module state.

Ask AI about this page

Short answer

How can I use AI to debug smart contract errors?

Your AI client uses Nodereal to pull transaction traces and account resources directly from the blockchain. It then analyzes the execution flow and module state to pinpoint exactly where a call failed. You get a clear breakdown of the error logic and state changes.

Where every issue lands.

Debugging outcomes

The AI processes raw chain data into actionable insights.

TRACE

Execution paths

The AI pulls the full call stack for a transaction. You see exactly which internal calls succeeded or failed.

STATE

Module inspection

Your agent looks at account resources and Move modules. It identifies how state changes affected the error.

LOGIC

Error identification

The AI compares the trace against the module code. It tells you which condition or assertion triggered the revert.

HUMAN

Manual fixes

The AI identifies the bug but cannot rewrite the contract. You take the findings to your IDE to apply the fix.

The workflow

What your AI does when a transaction fails.

The AI moves from raw hex data to a logical explanation of the failure.

  1. Trace the call stack

    The AI pulls the full execution history of a specific transaction to see every internal call made.

    debug_trace_transaction
  2. Inspect Aptos modules

    For Aptos-based errors, the agent pulls the specific Move modules associated with the account.

    aptos_get_account_modules
  3. Check account state

    The agent examines the resources stored in an account to see how the state looks after a failed call.

    aptos_get_account_resources
  4. Analyze the error

    The AI correlates the trace data with the module logic to explain why the execution reverted.

    debug_trace_transaction

Try it

Copy these to start.

Use these prompts to begin debugging immediately.

Starting points

Swap the transaction hashes and account addresses with your actual data.

NodeReal Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_rBCCylJboTjAuEJjKxGS91gr4oIB05T0frrua8Di/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — NodeReal capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "nodereal-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_rBCCylJboTjAuEJjKxGS91gr4oIB05T0frrua8Di/mcp"
    }
  }
}
Copy into chat04
  • Trace this transaction hash 0x123... and tell me why it reverted.

  • Inspect the Move modules for account 0xabc... to find the resource causing this error.

  • Look at the account resources for 0xdef... and explain the state after this transaction.

  • Analyze the execution trace for this hash and compare it to the module logic.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Nodereal once, then ask.

One connection gives your AI access to EVM and Aptos data. Your credentials stay encrypted and secure.

Connect Nodereal to your AI

FAQ

Common questions

  • 01

    Can the AI fix the smart contract for me?

    No. The AI identifies the error and explains the logic, but you must manually edit and redeploy the code.

  • 02

    Does the AI need my private keys?

    No. The AI only uses Nodereal to read public blockchain data like traces and resources.

  • 03

    Can I debug transactions on any chain?

    This specific setup focuses on EVM and Aptos via the provided tools.

  • 04

    Can the AI change the state of an account?

    No. The tools are read-only. The AI can only inspect what has already happened on the chain.

  • 05

    Will the AI automatically run a trace every time I ask a question?

    The AI only invokes the trace tool when you specifically ask it to investigate a transaction.

  • More questions about Nodereal? The Connector page answers them. See everything the Nodereal Connector can do

Connect NodeReal to Claude, Cursor, ChatGPT & more