# contract-guard API

> contract-guard API is a paid API for AI agents from eltociear-contract-guard.hf.space, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns pre-interaction risk signals for an EVM smart contract or token, including proxy status, EIP-7702 flags, ERC20 metadata, and a risk score on Base.

## Facts

- Endpoint: POST https://eltociear-contract-guard.hf.space/check
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/contract-guard-api-1631e95b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0YaBoBlh3ht71Z2-I4NDa

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 contract-guard-api-1631e95b -d '<json body>'
```

Example prompt: Before I interact with the contract at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base, can you check its risk level, whether it's a proxy, and pull any ERC20 metadata for it?

## When to prefer this

Use this endpoint when you need a quick, pre-interaction risk signal for a specific EVM contract or token before approving a transaction, swapping, or interacting with a DeFi protocol — especially on Base. Prefer it over generic block explorers when you want a structured risk score, proxy detection, and ERC20 metadata in a single API call without parsing raw chain data.

## Known failure modes

- Invalid or malformed contract address returns a validation error
- Unsupported chain identifier returns an error or null result
- Contract not deployed on the specified chain returns empty or null data
- Timeout or upstream unavailability returns a 5xx error
- Address is an EOA (externally owned account), not a contract — is_contract may be false with limited data

## How this service works

Risk check for an EVM contract/token address

## Output

A JSON object containing: the queried address and chain, a risk_score (integer), a risk_level string (e.g. HIGH/LOW), boolean flags is_proxy and is_contract, an array of risk flags (e.g. EIP-7702 indicators), and ERC20 token metadata (name, symbol, decimals) if applicable.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "enum": [
    "base",
    "ethereum"
   ],
   "type": "string",
   "description": "Chain (default base)"
  },
  "address": {
   "type": "string",
   "description": "EVM contract/token address (0x...)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "flags": [
   "..."
  ],
  "token": {
   "name": "USD Coin",
   "symbol": "USDC",
   "decimals": 6
  },
  "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "is_proxy": true,
  "risk_level": "HIGH",
  "risk_score": 40,
  "is_contract": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/contract-guard-api-1631e95b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from eltociear-contract-guard.hf.space](https://www.zero.xyz/host/eltociear-contract-guard.hf.space/llms.txt)
