# agent402.tools Contract Audit

> agent402.tools Contract Audit is a paid API for AI agents from agent402.tools, paid per call via x402, $0.022/call, status unknown (last checked 2026-09-13).

Audits a smart contract by combining verified source retrieval, heuristic vulnerability scanning, known-address lookup, function-selector resolution, and a read-only dry-run of given calldata

## Facts

- Endpoint: POST https://agent402.tools/api/skill/contract-audit
- Price: $0.022/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-contract-audit-2d8e2074
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xRAVB2dDxS4DXidbIlEkm

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-tools-contract-audit-2d8e2074 -d '<json body>'
```

Example prompt: Before I interact with this contract, can you audit 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum — check the verified source, scan for vulnerabilities, look up if it's a known address, and do a dry-run of a balanceOf call?

## When to prefer this

Choose this endpoint when an AI agent needs to triage a smart contract before executing a transaction — especially useful for DeFi interactions, NFT contracts, or any unfamiliar contract address where safety verification, source confirmation, and pre-flight simulation are all needed in a single bundled call rather than orchestrating multiple separate lookups

## Known failure modes

- Unverified contract source — contract not verified on block explorer, source unavailable
- Unknown network — network value not in supported list (ethereum/base/polygon/arbitrum/optimism)
- Invalid address — malformed or non-contract address returns error
- Simulation failure — calldata reverts or is malformed, dry-run returns revert reason
- Rate limit or payment failure — x402 payment not accepted or insufficient USDC balance

## How this service works

Bundled execution of the Contract audit workflow - Triage a smart contract before an agent interacts with it: verified Solidity source, heuristic vulnerability scan, known-address check, function-selector resolution, and a read-only dry-run of the exact call you plan to make. One x402 payment runs 5 underlying tools (contract-source, solidity-scan, selector-lookup, address-label, tx-simulate); partial-success per step.

## Output

Returns a bundled audit report covering: verified Solidity source code, heuristic vulnerability scan findings, known-address database match (flagged/trusted/unknown), resolved function selectors for the contract's ABI, and the result of a read-only dry-run simulation of the provided calldata

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "string",
   "description": "0x-prefixed calldata you intend to send (default: a balanceOf probe)"
  },
  "address": {
   "type": "string",
   "description": "0x-prefixed contract address to audit"
  },
  "network": {
   "type": "string",
   "description": "EVM network (ethereum / base / polygon / arbitrum / optimism, default base)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "args": {
   "data": "0x70a08231000000000000000000000000abf4fabd7c416fb67202e5f9002389fc75e2a9d0",
   "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "network": "base"
  },
  "pack": "contract-audit",
  "steps": [
   {
    "ok": true,
    "slug": "contract-source",
    "result": {}
   },
   {
    "ok": true,
    "slug": "solidity-scan",
    "result": {}
   },
   {
    "ok": true,
    "slug": "selector-lookup",
    "result": {}
   },
   {
    "ok": true,
    "slug": "address-label",
    "result": {}
   },
   {
    "ok": true,
    "slug": "tx-simulate",
    "result": {}
   }
  ],
  "summary": "5/5 steps succeeded"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-contract-audit-2d8e2074/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
