{"uid":"cap_yFHnmoMvCpCNFtgO9vt6X","slug":"evm-decode-signature-1293518c","name":"EVM Decode Signature","description":"Reverse a 4-byte function selector, an event topic hash, or raw calldata into its human-readable signature using the 4byte database, with collisions resolved so the real signature (the oldest registered) is returned first and the attacker-registered lookalikes are flagged. Parameter types are parsed out.","url":"https://api.agentstools.dev/evm/decode-signature","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"input":{"type":"string","description":"Raw calldata or hex; the first 4 bytes are taken as the selector (alternative to selector/topic0)"},"topic0":{"type":"string","description":"Event topic0 hash (0x + 64 hex)"},"selector":{"type":"string","description":"4-byte function selector (0x + 8 hex)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YyO9HnKF_N98Mgkj4r-rL","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Reverse a 4-byte function selector, event topic0 hash, or raw calldata into its human-readable ABI signature using the 4byte database, with collision detection and parameter type parsing.","exampleAgentPrompt":"What Solidity function does the selector 0xa9059cbb correspond to? Decode it using the 4byte database and give me the full signature with parameter types, flagging any collisions.","exampleUseCases":[{"title":"Identify unknown transaction calldata","prompt":"I'm looking at this raw Ethereum transaction input: 0xa9059cbb000000000000000000000000... — can you tell me what function is being called and what parameters it takes?"},{"title":"Decode event topic hash for log analysis","prompt":"I have an event topic0 hash 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef — what event signature does this correspond to and what are its parameter types?"},{"title":"Security review of contract interaction","prompt":"Before I approve this transaction, decode the 4-byte selector 0x23b872dd and tell me if there are any collisions in the 4byte database I should be worried about — I want to know the real signature and any attacker-registered lookalikes."}],"resultDescription":"Returns the canonical human-readable ABI signature (e.g. 'transfer(address,uint256)') corresponding to the input selector or topic0 hash, with parsed parameter types. Collisions from the 4byte database are listed, with the oldest-registered (most likely authentic) signature ranked first and any lookalike entries flagged. For raw calldata input, the first 4 bytes are extracted as the selector automatically.","failureModes":["Selector not found in 4byte database — returns no match or empty results","Invalid hex format for selector/topic0/calldata — returns validation error","Ambiguous collisions with no clear canonical entry — all candidates returned without definitive resolution","Rate limiting or payment failure via x402 — returns 402 Payment Required","Network timeout from 4byte upstream — returns 503 or gateway error"],"whenToPreferThis":"Choose this endpoint when you need to reverse-engineer an unknown EVM function selector or event topic hash into a human-readable signature, especially when security matters and collision detection is important. Prefer it over manual 4byte.directory lookups when you need structured output with parameter types parsed and collisions ranked. Ideal for transaction analysis, smart contract auditing, calldata inspection, and any workflow where raw hex must be made human-interpretable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:48:20.526Z","isFirstParty":false}