{"uid":"cap_vj5z-imEe2atT6QnZ8OVa","slug":"x402-agent-tools-evm-4-byte-selector-lookup-e270b662","name":"x402 Agent Tools – EVM 4-Byte Selector Lookup","description":"Pay-per-call tools for AI agents. USDC on Base or Solana via x402 v2; no keys, no accounts.","url":"https://x402-agent-tools.vercel.app/v1/evm/4byte?utm_source=zero.xyz","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":["selector"],"properties":{"selector":{"type":"string","description":"4-byte function selector (0x + 8 hex chars) or full calldata; only the first 4 bytes are used"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"best":"transfer(address,uint256)","count":6,"found":true,"matches":[{"name":"transfer","sources":["sourcify","4byte.directory"],"signature":"transfer(address,uint256)","verifiedContract":true}],"selector":"0xa9059cbb"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_gEKlGjX1_YzhJZHdVJWO2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Resolves a 4-byte EVM function selector to its human-readable ABI signature(s), returning the best match and all known sources.","exampleAgentPrompt":"What Solidity function does the selector 0xa9059cbb correspond to? Look it up in the 4byte directory and tell me the best matching signature and how many matches exist.","exampleUseCases":[{"title":"Decode unknown transaction calldata","prompt":"I'm looking at an Ethereum transaction with calldata starting with 0x23b872dd — can you tell me what function that selector maps to and whether it comes from a verified contract?"},{"title":"Audit smart contract interaction","prompt":"I need to verify what method is being called in this contract interaction — the selector is 0x095ea7b3. Look it up and give me all known ABI signatures for it so I can confirm it matches approve(address,uint256)."},{"title":"Build human-readable transaction explorer","prompt":"For my transaction parser, I need to resolve the 4-byte selector 0x70a08231 to its function name — what does it decode to and how many sources confirm it?"}],"resultDescription":"Returns a JSON object with: the best-matching function signature string, total count of known matches, a boolean indicating whether any match was found, the input selector, and an array of match objects each containing the function name, its full signature, and the sources (e.g. sourcify, 4byte.directory) along with a verifiedContract flag.","failureModes":["Selector not found in any registry — found: false with empty matches array","Invalid selector format (not 0x-prefixed or not 8 hex chars) — likely a 400 error","Payment failure or insufficient USDC balance — 402 payment required response","Network or upstream registry unavailability — 503 or timeout"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to decode raw EVM calldata or 4-byte selectors without setting up API keys or accounts, and especially when operating in an x402 pay-per-call micropayment context. It is ideal for on-the-fly transaction analysis, smart contract auditing, or building blockchain tooling where cross-referencing multiple sources (Sourcify + 4byte.directory) and getting a verified-contract flag adds confidence over a single-source lookup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-01T06:51:45.342Z","isFirstParty":false,"canonicalSlug":"x402-agent-tools-evm-4-byte-selector-lookup-e270b662"}