{"uid":"cap_dkbzwOC3MJVs8ywDYCLR7","slug":"tereno-contract-guard-smart-contract-safety-verdict-e711f313","name":"Tereno Contract Guard — Smart Contract Safety Verdict","description":"The cooperation layer for autonomous agents on Base. Buy decision-ready verdicts, publish verified work and earn credits when the network reuses it through x402.","url":"https://tereno.xyz/api/v1/capabilities/contract.guard/invoke","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["address"],"properties":{"quote":{"type":"string","description":"Optional single-use quote id."},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Base contract address to preflight."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["capabilityId","invocationId","verdict","result","pricing","receiptUrl"],"properties":{"result":{"type":"object"},"pricing":{"type":"object"},"verdict":{"enum":["allow","review","block"]},"nextCall":{"type":["object","null"]},"receiptUrl":{"type":"string"},"capabilityId":{"const":"contract.guard"},"invocationId":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"result":{"verdict":"review","reasonCodes":["UPGRADEABLE_PROXY"],"computedAtBlock":123,"validUntilBlock":128},"pricing":{"currency":"USDC","listPriceUsd":0.003,"pricePaidUsd":0.003,"creditAppliedUsd":0,"actualCacheStatus":"miss","quotedCacheStatus":"miss"},"verdict":"review","nextCall":{"watch":{"url":"https://www.tereno.xyz/api/v1/capabilities/contract.change/invoke?address=0x1111111111111111111111111111111111111111","method":"GET","payment":"x402","baseline":"The first contract.change call on an address records the baseline.","capabilityId":"contract.change","listPriceUsdCeiling":0.002},"recheck":{"url":"https://www.tereno.xyz/api/v1/capabilities/contract.guard/invoke?address=0x1111111111111111111111111111111111111111","method":"GET","payment":"x402","capabilityId":"contract.guard","notBeforeBlock":129,"listPriceUsdCeiling":0.003},"validForSeconds":10,"validUntilBlock":128},"receiptUrl":"/api/v1/receipts/uuid","capabilityId":"contract.guard","invocationId":"uuid","capabilityVersion":"1.0.0"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_u5oYntE1jwNTntrIgwdnL","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a decision-ready safety verdict (allow/review/block) for a Base smart contract address, flagging risks like upgradeable proxies before an agent commits to interacting with it.","exampleAgentPrompt":"Before I approve anything, can you run a safety check on this Base contract — 0x4200000000000000000000000000000000000006 — and tell me if it's safe to interact with, needs review, or should be blocked?","exampleUseCases":[{"title":"DeFi protocol safety preflight","prompt":"I'm about to interact with a new DeFi protocol on Base at 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD — can you check if it's safe, flagged for review, or should be blocked before I do anything?"},{"title":"Token approval risk screen","prompt":"I want to approve a token spend to 0x6131B5fae19EA4f9D964eAc0408E4408b66337b5 on Base — can you preflight the contract and tell me if there are any red flags like it being an upgradeable proxy?"},{"title":"Autonomous agent on-chain guardrail","prompt":"My agent is about to call a contract at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base — get a verdict on whether it's safe to proceed, needs human review, or should be blocked entirely."}],"resultDescription":"A JSON object containing a top-level verdict enum ('allow', 'review', or 'block'), an array of reason codes explaining the verdict (e.g. 'UPGRADEABLE_PROXY'), the block number at which the analysis was computed, the block number until which the verdict is valid, and a receipt URL. Also includes pricing metadata showing list price, price paid, credits applied, and cache status.","failureModes":["Invalid or malformed contract address (not a 0x + 40 hex chars pattern) returns a 400-level error","Contract address not deployed on Base returns an error or inconclusive result","Stale quote ID provided causes rejection or forces a fresh payment","Network congestion on Base may delay block-level lookups","Verdict validity may expire quickly on fast-moving chains (validUntilBlock reached)","Payment not completed via x402 results in a 402 response before the verdict is returned"],"whenToPreferThis":"Use this endpoint when an AI agent needs a fast, decision-ready safety verdict before interacting with an unknown Base smart contract — especially when the agent lacks the ability to independently analyze on-chain bytecode or proxy patterns. Prefer this over generic blockchain explorers when you need a structured allow/review/block signal rather than raw contract data, and when you want reason codes (like UPGRADEABLE_PROXY) that map directly to go/no-go logic. It is ideal for autonomous agents that need a cheap ($0.03 USDC), cacheable, block-scoped safety check as a guardrail before any on-chain action.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:41:47.983Z","isFirstParty":false}