24-Vector Solidity Contract Auditor
ingravity_auditSolidityContractAudits a single Solidity file (code, required; optional contractName) across 24 SWC/DeFi rules using a 4-gate filter that excludes dust rounding and trusted-admin paths. Read-only and never broadcasts transactions: optionally supply deployed contractAddress, chainId (default 8453), and ownerTreasury to check live TVL via RPC and generate unsigned EIP-5792/EOA Safe-Harbor rescue calldata (90%-95% to ownerTreasury). Set tier to FULL ($0.85 USDC, default) for findings or ESSENTIAL ($0.35 USDC) for score and counts; unpaid calls return isError: true, and CRITICAL/HIGH patches remain sealed under Anti-Bypass until 0.15% SLA or 5%-10% rescue settlement. Use for single contracts; use ingravity_generateMultiContractProtocolDossier for multi-file protocols.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "ingravity_auditSolidityContract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Raw Solidity (.sol) smart contract source code to audit across 24 SWC/DeFi rules (non-empty string required). | |
| tier | No | Billing & output depth: FULL ($0.85 USDC) includes findings and Safe-Harbor calldata (subject to Anti-Bypass sealing on CRITICAL/HIGH until proportional settlement); ESSENTIAL ($0.35 USDC) returns score, grade, status, and severity counts only. | FULL |
| chainId | No | EVM Chain ID used only when contractAddress is supplied for live TVL verification (8453 Base, 42161 Arbitrum, 10 Optimism, 137 Polygon, 1 Ethereum; unknown falls back to 8453). | |
| contractName | No | Optional contract identifier or filename echoed in the report. | Contract.sol |
| ownerTreasury | No | Optional protocol owner/multisig recipient (0x...) designated to receive 90%-95% of rescued capital in generated unsigned calldata. | |
| contractAddress | No | Optional deployed EVM contract address (0x...) on chainId to verify live TVL via RPC and generate unsigned Safe-Harbor rescue calldata. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| loc | Yes | Source lines of code analyzed. | |
| grade | Yes | Letter grade derived from securityScore. | |
| action | Yes | Deployment gate directive. | |
| signal | Yes | Traffic-light severity indicator. | |
| status | Yes | Overall readiness verdict. | |
| chainId | Yes | Resolved EVM chain ID. | |
| settled | Yes | Whether x402 USDC payment settled cleanly. | |
| summary | Yes | Finding counts grouped by severity. | |
| findings | No | Per-finding details with line coordinates and fix guidance (FULL tier only; CRITICAL/HIGH coordinates sealed until proportional settlement when applicable). | |
| contractName | Yes | Audited contract label. | |
| securityScore | Yes | Deterministic security score from 0 to 100. | |
| verifiedOnChainTvlUsd | Yes | Live on-chain TVL verified via RPC when contractAddress is supplied (0 otherwise). | |
| savedCapitalEstimateUsd | Yes | Estimated capital at risk or prevented exploit range. | |
| capitalSalvageAndSafeHarbor | No | Unsigned Safe-Harbor rescue plan or optional pre-deploy circuit-breaker snippet (FULL tier only). | |
| proportionalRescueCommissionPolicy | No | 0.15% Pre-Flight SLA and 5%-10% Safe-Harbor policy metadata (FULL tier only). |