Function selectors of a contract
Open the contract on its entity page →
The 4-byte function selectors found in a contract's bytecode, each resolved to a known signature and name where one exists, with how many known signatures share the selector.
GET https://tracefast.xyz/api/v1/chains/1/contracts/{address}/selectors
| Parameter | In | Type | Notes |
|---|---|---|---|
address | path | string | 0x-prefixed, 40 hex characters, any case |
Access — an API key on the Enriched Data 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_selectors on the MCP server. Stable — see stability.
chains/1 is a literal: other chain ids answer 404 chain_not_supported. The
method takes no query parameters — an unknown one is refused rather than ignored.
What it covers, and what it does not
- Selectors come from the bytecode, not from a verified source or an ABI. A proxy answers with its own selectors, not its implementation's: ask this method about the implementation address from the proxy method.
- A signature is a best match, not proof. A selector is only 4 bytes, and
unrelated signatures collide. When
candidateCountis above 1,signatureis the most common known one. The0xffffffffrow in the example below is such a match: the name is a known collision, not a function the contract declares. abi_missingis not "no function". The selector is in the code; no known signature has it.
Response
200 application/json, the USDC proxy:
{
"data": {
"chainId": 1,
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"codeHash": "0xd80d4b7c890cb9d6a4893e6b52bc34b56b25335cb13716e0d1d31383e6b41505",
"selectorCount": 6,
"selectors": [
{ "selector": "0x8f283970", "signature": "changeAdmin(address)", "name": "changeAdmin", "candidateCount": 2, "decodeStatus": "ambiguous" },
{ "selector": "0xf851a440", "signature": "admin()", "name": "admin", "candidateCount": 1, "decodeStatus": "partial" },
{ "selector": "0xffffffff", "signature": "LOCK8605463013()", "name": "LOCK8605463013", "candidateCount": 3, "decodeStatus": "ambiguous" },
{ "selector": "0x3659cfe6", "signature": "upgradeTo(address)", "name": "upgradeTo", "candidateCount": 2, "decodeStatus": "ambiguous" },
{ "selector": "0x4f1ef286", "signature": "upgradeToAndCall(address,bytes)", "name": "upgradeToAndCall", "candidateCount": 2, "decodeStatus": "ambiguous" },
{ "selector": "0x5c60da1b", "signature": "implementation()", "name": "implementation", "candidateCount": 1, "decodeStatus": "partial" }
]
},
"meta": {
"chain": "ethereum",
"timestamp": 1789047625629,
"cached": false,
"docs": "https://docs.tracefast.xyz/api/contract-selectors"
}
}data
| Field | Meaning |
|---|---|
chainId | 1 — Ethereum mainnet |
address | the contract, lowercase |
codeHash | hash of the code the selectors were read from |
selectorCount | how many selectors were found |
selectors[] | every selector, each with its resolution |
A selector
| Field | Meaning |
|---|---|
selector | the 4-byte selector, 0x-prefixed |
signature | the canonical signature, for example transfer(address,uint256). Absent when no known signature has this selector, or when the only one known is malformed |
name | the function name alone, present whenever the selector is named. It can be present without signature: when the only known signature is malformed (say transfer(address uint256)), only the name is served |
candidateCount | how many known signatures share the selector. 1 is unambiguous |
decodeStatus | partial — one known signature, parameter names unknown; ambiguous — several known signatures share the selector; abi_missing — no known signature |
How a selector is derived from a function signature: ethereum.org — smart contract ABI.
Errors
| Status | code | When | details |
|---|---|---|---|
| 404 | not_found | no contract code is indexed at this address | — |
| 422 | block_not_available | reason: coverage_gap — recent blocks are in a coverage gap, and a contract deployed in them cannot be seen right now. Retry later | coverageGapFromBlock, coverageGapToBlock, maxAvailableBlock |
Malformed input, unknown parameters and the key check's 401/403/429 are the same for every method — see conventions and API keys.
Related pages
- One contract —
selectorCountand the ERC-20 interface read from these selectors - Bytecode of a contract — the code they were read from
- Implementations of a proxy contract — where a proxy's real functions live
- Contracts on the entity page — the same contract, read in the app
Last updated 22 Oct 2026, 08:06 UTC · verified against TraceFast v1.0.261 · Markdown