{"uid":"cap_yMCOLBXZmW2szsHqzZ7gH","slug":"ethereum-calldata-decoder-function-selector-calculator-d4522cff","name":"Ethereum Calldata Decoder & Function Selector Calculator","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/v1/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_YfeEVcS3vAAmLYmVIWt_k","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":"Compute the keccak256 hash and 4-byte function selector for the signature 'transfer(address,uint256)', then decode the raw calldata '0xa9059cbb000000000000000000000000abcdef1234567890abcdef1234567890abcdef12000000000000000000000000000000000000000000000000002386f26fc10000' using types ['address','uint256'].","exampleUseCases":[{"title":"Decode live transaction calldata","prompt":"I've got raw calldata from an Ethereum transaction — '0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045000000000000000000000000000000000000000000000000016345785d8a0000' — can you decode it using ABI types ['address','uint256'] and tell me the recipient address and token amount?"},{"title":"Look up ERC-20 function selector","prompt":"What's the 4-byte function selector and full keccak256 hash for the Solidity signature 'approve(address,uint256)'? I need it to verify a contract interaction."},{"title":"Debug unknown contract call","prompt":"I'm seeing an Ethereum transaction with calldata starting with an unknown selector. Can you compute the function selector for 'swapExactTokensForTokens(uint256,uint256,address[],address,uint256)' so I can check if it matches?"}],"resultDescription":"Returns the keccak256 hash of the input signature, the 4-byte function selector (first 4 bytes of the hash), and — if raw hex calldata and ABI types are provided — an ordered list of decoded parameter values matching the supplied Solidity types.","failureModes":["Invalid or malformed Solidity signature string returns an error","Hex calldata length mismatch with provided ABI types causes a decode failure","Unsupported or complex Solidity types (e.g. dynamic arrays, tuples) may not be decodable","Malformed hex string (missing 0x prefix, odd length) returns a parse error","Mismatch between number of ABI type entries and encoded calldata parameters causes incorrect or failed decode"],"whenToPreferThis":"Choose this endpoint when you need to programmatically compute Ethereum function selectors or keccak256 hashes from Solidity signatures without running a local Ethereum toolchain, or when you need to decode raw ABI-encoded calldata from a transaction and know the parameter types. Ideal for smart contract debugging, transaction analysis, and building blockchain developer tooling in an agent workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:58:11.578Z","isFirstParty":false}