How to decode EVM transaction calldata with an API
Updated 2026-11-10
Use when an agent has raw transaction calldata and needs the function and arguments it encodes.
From an MCP client, add https://tanod.dev/mcp and call decode_calldata; the first 10 calls per IP per UTC day are free (shared by all chainpeek reads), then each call is USD 0.003 with x402, no key or signup.
POST 0x-prefixed calldata to /v1/chain/calldata. With a function signature it decodes the arguments; without one it looks the 4-byte selector up and returns every candidate that decodes cleanly.
Request
calldata is hex with at least a 4-byte selector. signature is optional, for example transfer(address,uint256). The example is an ERC-20 transfer of 1000 base units to 0x00...01.
curl -s -X POST https://tanod.dev/v1/chain/calldata \
-H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
-d '{"calldata":"0xa9059cbb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8","signature":"transfer(address,uint256)"}'Response
{
"selector": "0xa9059cbb",
"bytes": 68,
"candidates": ["transfer(address,uint256)"],
"best": {
"signature": "transfer(address,uint256)",
"name": "transfer",
"args": [
{"type": "address", "value": "0x0000000000000000000000000000000000000001"},
{"type": "uint256", "value": "1000"}
]
},
"note": "signature database matches are unverified hints; selectors can collide"
}Limits and caveats
Selector matches are hints. Without a signature, names come from a signature database and are unverified. Two different functions can share a selector, and anyone can craft a function whose name looks harmless.
Decoding is not intent. A clean decode shows what the bytes encode, not what the target contract does with them. Check the destination address before signing.
The request has no chain field: decoding is of the bytes you send.
Price and free allowance
USD 0.003 per call, paid in USDC on Base, Polygon, Solana, BNB Chain or Arbitrum with x402. 10 free chain reads per IP per UTC day with the header X-Tanod-Free: 1, in one pool shared with the other chainpeek reads. MCP tool: decode_calldata at https://tanod.dev/mcp, where the free tier is automatic.
Use it from Claude without writing code: in claude.ai or Claude Desktop, add https://tanod.dev/mcp/chain?via=decode-calldata-api as a custom connector (steps), then ask in plain words, for example "Decode this transaction calldata and tell me which function it calls: 0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa960450000000000000000000000000000000000000000000000000000000005f5e100." The free daily allowance is applied automatically over MCP. Beyond it a call needs an x402 payment, which these clients can make.
Related guides: How to look up a transaction's status and fee on Base or Ethereum, How to check a contract or token address for risk before you transact, How to check an ERC-20 approval (allowance). Back to tanod.dev or the guide index. Results are automated and heuristic.