• LOGS
  • STATE
  • GAS
  • HUMAN

How to debug smart contracts with your AI

Connect Conflux to your AI client to turn raw blockchain data into actionable debugging insights.

Ask AI about this page

Short answer

How can I use AI to debug Conflux smart contracts?

Your AI pulls transaction receipts and event logs to pinpoint where execution failed. It also checks current contract states and estimates gas to prevent out-of-gas errors. You get a clear breakdown of what happened on-chain.

Debugging outcomes.

Where every issue lands.

What your AI delivers after you connect.

LOGS

Trace execution errors

The AI reads event logs to find the exact moment a contract reverted. You get a plain-English explanation of the failure.

STATE

Verify contract data

Your agent checks specific storage variables or balances. This confirms if your contract logic is actually updating the state as intended.

GAS

Predict transaction costs

The AI calculates the gas and collateral needed for a call. This helps you avoid failed transactions due to insufficient funds.

HUMAN

Manual code review

The AI identifies the on-chain symptoms, but you still need to look at your Solidity source code to fix the logic.

The workflow

What your AI does when a bug is reported.

The AI moves from raw data to a diagnosis.

  1. Analyze failures

    The AI pulls the transaction receipt to see the status and logs of a specific hash.

    cfx_get_transaction_receipt
  2. Inspect events

    It scans the logs for specific error events or state changes that occurred during execution.

    cfx_get_logs
  3. Check variables

    The AI calls specific functions on the contract to read current values and verify the state.

    cfx_call
  4. Test costs

    It runs a simulation to see how much gas and collateral a specific call will consume.

    cfx_estimate_gas_and_collateral

Try it

Copy these to start.

Direct prompts to trigger the Conflux tools.

Starting points

Swap out the transaction hashes and contract addresses with your own data.

Conflux Connector

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

Connector linkhttps://edge.vinkius.com/vk_preview_QYHcelvzK7H6fQl0S40QxpBEKRdsGkTTxtS3s0Ra/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 — Conflux capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "conflux-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_QYHcelvzK7H6fQl0S40QxpBEKRdsGkTTxtS3s0Ra/mcp"
    }
  }
}
Copy into chat04
  • Check the logs for transaction 0x123... to see why it reverted.

  • What is the current value of the balance function for contract 0xabc...?

  • Estimate the gas and collateral needed for a call to this contract: 0xdef...

  • Look at the logs for the last 10 blocks to find all Transfer events.

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

Start here

Connect Conflux once, then ask.

One click connects the MCP to your client. Your credentials stay encrypted and secure while your AI gains direct access to the Conflux network.

Connect Conflux to your AI

FAQ

How the debugger behaves

  • 01

    Can the AI fix my smart contract code?

    No. The AI can read on-chain data and tell you what went wrong, but you must manually edit and redeploy your code.

  • 02

    Can the AI execute transactions for me?

    No. The tools only allow the AI to read data, check logs, and estimate costs. It cannot sign or broadcast transactions.

  • 03

    Does the AI see my private keys?

    No. The AI only interacts with the blockchain through the provided tools. It never has access to your wallet or private keys.

  • 04

    Can it check state on any EVM chain?

    No. This specific connector is built for Conflux. It cannot access data on Ethereum or other networks.

  • 05

    How does it know if a transaction failed?

    It uses the transaction receipt to check the status and then inspects the logs to find the specific error message.

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

Connect Conflux to Claude, Cursor, ChatGPT & more