{"uid":"cap_aMOTj1f6NpzPjmFx-OHPH","slug":"ethereum-calldata-decoder-keccak256-selector-ba9d009a","name":"Ethereum Calldata Decoder & Keccak256 Selector","description":"Compute the keccak256 hash and 4-byte function selector of a signature string, and optionally ABI-decode raw hex calldata given an ordered list of static Solidity types.","url":"https://api.24klabs.ai/api/eth-calldata-decode","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"signature":{"type":"string"}}},"responseSchema":{"type":"json","example":{"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_oQrYGJnZRUs0IjZhydLiF","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":"Computes the keccak256 hash and 4-byte function selector of a Solidity signature string, and optionally ABI-decodes raw hex calldata given an ordered list of static Solidity types.","exampleAgentPrompt":"Can you compute the keccak256 hash and 4-byte selector for the Solidity signature 'transfer(address,uint256)', and also decode the raw calldata '0xa9059cbb000000000000000000000000ab5801a7d398351b8be11c439e05c5b3259aec9000000000000000000000000000000000000000000000000002386f26fc10000' using types ['address','uint256']?","exampleUseCases":[{"title":"Verify ERC-20 function selector","prompt":"What is the 4-byte function selector and keccak256 hash for the Solidity signature 'transfer(address,uint256)'? I want to confirm it matches 0xa9059cbb."},{"title":"Decode smart contract transaction input","prompt":"Decode this raw calldata hex '0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045000000000000000000000000000000000000000000000000016345785d8a0000' using ABI types ['address','uint256'] so I can see the actual recipient address and token amount."},{"title":"Debug unknown contract call","prompt":"I have raw calldata '0x23b872dd000000000000000000000000abc...000000000000000000000000def...0000000000000000000000000000000000000000000000000de0b6b3a7640000' from a transaction — can you decode it with types ['address','address','uint256'] and also give me the keccak256 of 'transferFrom(address,address,uint256)'?"}],"resultDescription":"Returns the keccak256 hash of the provided signature string, the first 4 bytes of that hash as the function selector (hex), and if calldata and ABI types are provided, an ordered array of decoded parameter values corresponding to the supplied Solidity types.","failureModes":["Invalid Solidity type in ABI list returns a type parsing error","Malformed or truncated hex calldata causes decoding failure","Calldata length mismatch with provided ABI types results in an error","Missing required signature field returns a validation error","Non-hex characters in calldata string cause parsing failure"],"whenToPreferThis":"Use this endpoint when you need to compute Ethereum function selectors or keccak256 hashes from Solidity signatures without running a local Ethereum toolchain, or when you need to ABI-decode raw hex calldata from blockchain transactions using a known type list. Prefer this over general-purpose hashing endpoints because it is specifically designed for Solidity ABI encoding semantics and returns both the full hash and the canonical 4-byte selector in one call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:00:50.935Z","isFirstParty":false}