{"uid":"cap_58Xgf_Vwdpg0BqpbY8DjH","slug":"ethereum-function-selector-event-topic-decoder-b3899409","name":"Ethereum Function Selector & Event Topic Decoder","description":"Translates a 4-byte function selector (e.g. 0xa9059cbb) or a 32-byte event topic into its human-readable signature (e.g. transfer(address,uint256)). Essential for an agent reading or verifying transactions. Live from 4byte.directory.","url":"https://api.vextorium.com/decodificar-firma-pago?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["firma"],"properties":{"firma":{"type":"string","description":"Function selector (0x + 8 hex) or event topic (0x + 64 hex)"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":["object","null"],"properties":{"nota":{"type":["string","null"]},"tipo":{"type":["string","null"]},"codigo":{"type":["string","null"]},"firmas":{"type":["array","null"],"items":{"type":["null","string"]}},"fuente":{"type":["string","null"]},"posibles":{"type":["number","null"]}}}}}}},"responseSchema":{"type":"json","example":{"nota":"Un mismo código puede casar con varias firmas (colisiones); la más antigua suele ser la real. Fuente: 4byte.directory.","tipo":"funcion","codigo":"0xa9059cbb","firmas":["transfer(address,uint256)","many_msg_babbage(bytes1)","transfer(bytes4[9],bytes5[6],int48[11])","func_2093253501(bytes)","join_tg_invmru_haha_fd06787(address,bool)","workMyDirefulOwner(uint256,uint256)"],"fuente":"4byte.directory","posibles":6}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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_zC_Y7SrHFi5Kd757YTROS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Translates a 4-byte function selector or 32-byte event topic hash into its human-readable Solidity signature by looking it up in the 4byte.directory database.","exampleAgentPrompt":"Can you tell me what Solidity function or event corresponds to the selector 0xa9059cbb? I'm trying to understand what a transaction is calling on an ERC-20 contract.","exampleUseCases":[{"title":"Decoding unknown transaction calldata","prompt":"I'm looking at a raw Ethereum transaction and the input starts with 0x23b872dd — can you decode that 4-byte selector and tell me what function is being called?"},{"title":"Identifying smart contract event topic","prompt":"I have an event log with topic 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef — what Solidity event does this correspond to?"},{"title":"Verifying DeFi transaction before signing","prompt":"Before I approve this transaction, can you look up the function selector 0x095ea7b3 and confirm what function it's calling so I know what I'm authorizing?"}],"resultDescription":"Returns a JSON object with the decoded signature(s) as an array of possible human-readable strings (e.g. 'transfer(address,uint256)'), the type (function or event), a code, the source (4byte.directory), the number of possible matches, and an optional note if multiple candidates exist.","failureModes":["Unknown selector — hash not found in 4byte.directory returns empty or null firmas array","Invalid hex format — input not matching 4-byte (0x + 8 hex chars) or 32-byte (0x + 64 hex chars) format returns error","Multiple ambiguous matches — some selectors map to more than one signature, all candidates returned","Network timeout connecting to 4byte.directory upstream","Payment authorization failure for x402 micropayment"],"whenToPreferThis":"Use this endpoint when an AI agent needs to interpret raw Ethereum transaction calldata or event logs and must identify what function or event a hex hash represents. Prefer this over manual ABI lookups when the full ABI is unavailable and the selector or topic needs to be reverse-engineered. Ideal for transaction monitoring, fraud detection, DeFi analytics, or any workflow where human-readable contract interaction context is needed from raw on-chain data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T06:46:26.926Z","isFirstParty":false,"canonicalSlug":"ethereum-function-selector-event-topic-decoder-b3899409"}