HTTP/1.1 402 PAYMENT REQUIRED agent402.base.eth · BASE · SOLANA · POLYGON · ARBITRUM · MONAD · CELO · AVALANCHE · SEI · OPTIMISM · STELLAR · ALGORAND · ROBINHOOD · USDC · USDG

Contract audit

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.

$0.15 per call · one payment for the whole workflow
POST /api/skill/contract-audit

5 tools run server-side in one request. You pay once, settle once, and get a single response - no orchestration, no per-step payments, and a partial-success envelope if any step fails. USDC over x402 on any supported chain.

When to use this pack

An agent is about to approve, transfer, or call an unfamiliar contract - you want the verified Solidity source scanned for red flags, the address checked against known labels, and the intended calldata simulated before anything is signed or broadcast: the first pass a smart-contract auditor would run.

Tools in this pack

All 5 run inside the single $0.15 call above. Each is also callable on its own if you only need one part.

Workflow

  1. Fetch the verified Solidity source and compiler metadata from Sourcify via contract-source - an unverified contract is itself a finding.
  2. Run solidity-scan over the returned source for line-anchored heuristic findings: tx.origin auth, delegatecall, selfdestruct, unchecked calls, weak randomness, and more.
  3. Resolve the 4-byte selector of the calldata you plan to send with selector-lookup so you know exactly which function it hits.
  4. Check the address against the curated known-address dataset with address-label - is this the real token/router/bridge or an impostor?
  5. Dry-run the exact call with tx-simulate (eth_call + gas estimate, strictly read-only) to see whether it succeeds or reverts before anything is signed.

Call it directly

Any x402 client pays the 402 and gets the whole workflow back in one response:

npx agent402-client call contract-audit {"address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"base","data":"0x70a08231000000000000000000000000abf4fabd7c416fb67202e5f9002389fc75e2a9d0"}

Run it in Claude

claude mcp add agent402 -s user -- npx -y agent402-mcp@latest

Then paste this prompt into Claude:

Audit the contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on base before interacting with it, using Agent402's contract-audit skill pack. (1) Fetch the verified source from Sourcify, (2) run the heuristic Solidity scan over it, (3) resolve the selector of the planned calldata 0x70a08231000000000000000000000000abf4fabd7c416fb67202e5f9002389fc75e2a9d0, (4) check the address against known labels, (5) simulate the call read-only. Report: verification status, scan findings by severity, what the calldata does, whether the address is a known contract, and the dry-run verdict.

← All skill packs