{"uid":"cap_RJMt8MLASaKbEnuWUJb8n","slug":"tereno-contract-change-detection-b58cbb26","name":"Tereno Contract Change Detection","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.change/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 compare with its previous Tereno observation."}},"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","required":["changed","baselineCreated","changes","current","validUntilBlock"],"properties":{"changed":{"type":"boolean"},"changes":{"type":"array"},"current":{"type":"object"},"baselineCreated":{"type":"boolean"},"validUntilBlock":{"type":"integer"}}},"pricing":{"type":"object"},"verdict":{"enum":["allow","review","block"]},"nextCall":{"type":["object","null"]},"receiptUrl":{"type":"string"},"capabilityId":{"const":"contract.change"},"invocationId":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"result":{"changed":false,"changes":[],"current":{"admin":null,"proxy":false,"paused":false,"address":"0x1111111111111111111111111111111111111111","network":"eip155:8453","bytecodeHash":"0xabababababababababababababababababababababababababababababababab","bytecodeBytes":4096,"implementation":null,"computedAtBlock":123456},"verdict":"allow","baselineCreated":false,"validUntilBlock":123456},"pricing":{"currency":"USDC","listPriceUsd":0.001,"pricePaidUsd":0.001,"creditAppliedUsd":0,"actualCacheStatus":"miss","quotedCacheStatus":"miss"},"verdict":"allow","nextCall":{"watch":null,"recheck":{"url":"https://www.tereno.xyz/api/v1/capabilities/contract.change/invoke?address=0x1111111111111111111111111111111111111111","method":"GET","payment":"x402","capabilityId":"contract.change","notBeforeBlock":123462,"listPriceUsdCeiling":0.002},"validForSeconds":10,"validUntilBlock":123461},"receiptUrl":"/api/v1/receipts/uuid","capabilityId":"contract.change","invocationId":"uuid","capabilityVersion":"1.0.0"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fMQRnrNYK7dTVHcyAQdHn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Detects whether a Base smart contract has changed since the last Tereno observation, returning a decision-ready verdict (allow/review/block) and a diff of any bytecode or proxy changes","exampleAgentPrompt":"Check if the Base contract at 0x1234567890abcdef1234567890abcdef12345678 has changed since Tereno last observed it and tell me whether it's safe to interact with.","exampleUseCases":[{"title":"Pre-transaction contract safety check","prompt":"Before I approve this DeFi transaction, check if the contract at 0xAbCd1234567890abcdef1234567890abcdef5678 on Base has been modified or upgraded since it was last observed — give me a verdict on whether it's safe to proceed."},{"title":"Proxy upgrade detection for a protocol","prompt":"Has the implementation behind the proxy contract at 0xDeadBeef1234567890abcdef1234567890abcdef been swapped out since Tereno's last snapshot? I want to know if any upgrade happened."},{"title":"Automated contract watchdog alert","prompt":"My agent just flagged a contract interaction — can you check if 0xFeedFace1234567890abcdef1234567890abcdef has had its bytecode changed, been paused, or had an admin change since the last Tereno baseline?"}],"resultDescription":"A JSON object containing: a top-level `verdict` field (allow/review/block), a `result` object with `changed` boolean, an array of `changes` describing what differed, the `current` contract state (address, network, bytecodeHash, bytecodeBytes, proxy flag, admin, paused, implementation, computedAtBlock), a `baselineCreated` flag (true if this was the first observation), and `validUntilBlock` indicating result freshness. Also includes `pricing` details (USDC amount paid, cache status) and a `receiptUrl`.","failureModes":["Invalid or non-checksummed address format returns a 400 validation error","Contract address not found on Base network may return empty or baseline-creation response","Network congestion may cause delayed block data","Expired or invalid quote ID returns a payment error","Rate limiting or insufficient USDC payment triggers 402 Payment Required"],"whenToPreferThis":"Use this endpoint when an AI agent needs a pre-interaction safety check on a Base smart contract — especially before executing a transaction, approving a protocol, or integrating with a DeFi contract. It is ideal for change detection workflows where you want a cached, cost-efficient verdict rather than running raw RPC calls yourself. Prefer it over generic block explorers when you need a structured, decision-ready allow/review/block signal rather than raw blockchain data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:39:35.741Z","isFirstParty":false}