Skip to content
TraceFast Docs

How a contract's code is built and how it can change

Open the contract on its entity page →

The security profile of one contract's current code — the proxy pattern detected in it and its confidence, its opcode-level features (DELEGATECALL, CALLCODE, a DELEGATECALL target read from storage), and what the knowledge graph proves about how it is built (architecture: for example immutable, an upgradeable proxy, a mutable implementation slot, metamorphic). Only proven facts are stated: an absent one means "not proven", never "no". Who changed a proxy's implementation and when is the control-history method; what the contract can do is the capabilities method. An address with no indexed code answers 404.

GET https://tracefast.xyz/api/v1/chains/1/contracts/{address}/security
ParameterInTypeNotes
addresspathstringThe contract, 0x + 40 hex, any case.

Access — an API key on the Intelligence plan or higher (plans), or no key at all: pay per call with x402 at the same path on https://mpp.tracefast.xyz/api/v1, at the price its 402 states. As a tool for AI agents: get_contract_security on the MCP server. Stable — see stability.

chains/1 is a literal: other chain ids answer 404 chain_not_supported. An unknown query parameter is refused rather than ignored.

Response

200 application/json, USDC. Lists in the example are cut to two entries.

{
  "data": {
    "chainId": 1,
    "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "codeHash": "0xd80d4b7c890cb9d6a4893e6b52bc34b56b25335cb13716e0d1d31383e6b41505",
    "bytecodeVariant": "legacy_analyzed",
    "proxyFamily": "oz_v1",
    "proxyConfidence": 3,
    "codeFeatures": {
      "hasDelegatecall": true,
      "hasCallcode": false,
      "delegatecallTargetFromStorage": true
    },
    "graphReached": true,
    "architecture": [
      {
        "attributeId": "architecture:has_mutable_impl_slot",
        "result": "pass",
        "referenceBlock": 18963716
      },
      {
        "attributeId": "architecture:proxy",
        "result": "pass",
        "referenceBlock": 18963716
      }
    ]
  },
  "meta": {
    "chain": "ethereum",
    "timestamp": 1794918332762,
    "cached": true,
    "docs": "https://docs.tracefast.xyz/api/contract-security"
  }
}

data

FieldMeaning
addressThe contract, lowercase and 0x-prefixed.
architectureWhat the knowledge graph proves about how the contract is built, as it names it — for example architecture:immutable, architecture:upgradeable_proxy, architecture:has_mutable_impl_slot, architecture:metamorphic, architecture:minimal_proxy_eip1167. Only proven facts are listed; an absent one is "not proven", never "no".
bytecodeVariantlegacy_raw, legacy_analyzed or eip7702 (a delegation designator, not code).
chainIdChain id. 1 is Ethereum mainnet.
codeFeaturesOpcode-level facts of the code. Absent with proxyFamily.
codeHashKeccak-256 hash of the current runtime code, 0x-prefixed — the code described here.
graphReachedtrue when the knowledge graph has reached the address at all; false means an empty architecture says nothing about the contract.
proxyConfidenceConfidence of proxyFamily, 0 (none) to 3 (high). Absent with it.
proxyFamilyProxy pattern detected in the code (the vocabulary of proxyFamily on the contract method). Absent when the code has not been analysed yet.

data.architecture[]

FieldMeaning
attributeIdThe attribute id, <family>:<name>.
referenceBlockThe block the fact was evaluated at.
resultpass (proven). Other values may appear and are not proof.
valueThe value, for a fact that has one (for example the signature threshold of a Safe in capability:safe_threshold_current), as a JSON scalar in text. Absent otherwise.

data.codeFeatures

FieldMeaning
delegatecallTargetFromStorageA DELEGATECALL target is read from storage, shown by following the data flow: the code the contract runs can be changed by writing that storage slot, which is how upgradeable proxies work. true is proven; false only when the code has no DELEGATECALL at all. Absent when the code has a DELEGATECALL and no storage-held target was proven — not proven is not "none". An account delegated by EIP-7702 (proxyFamily: eip7702) runs its delegate's code without any of these opcodes: its features describe the 23-byte delegation, not that code.
hasCallcodeThe code contains CALLCODE, the deprecated predecessor of DELEGATECALL.
hasDelegatecallThe code contains DELEGATECALL: it can run another contract's code against its own storage and balance.

meta is the same envelope on every method — see conventions.

Errors

StatusWhen
400bad_request: a malformed address (reason: address_invalid) or an unknown query parameter
404not_found: no contract code is indexed at the address; chain_not_supported, or an unknown path
422block_not_available (reason: coverage_gap): the address cannot be confirmed absent right now

Malformed input, unknown parameters and the key check's 401/403/429/503 are the same for every method — see conventions and API keys.


Last updated 19 Nov 2026, 11:46 UTC · verified against TraceFast v1.0.332 · Markdown