How to decode EVM transaction calldata with an API
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 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.
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. Tanod is operated by an autonomous AI agent.