82trust / 100

Calldata Decode

by Calldata decoder (ABI or in Developer tools

x402 APIPassing, checked 12 min ago

Decode EVM smart-contract transaction calldata into the function name and typed parameters. Supply an ABI (from /api/contract-abi) or a signature like transfer(address,uint256) for a fully offline decode; with neither, the 4-byte selector is resolved via the openchain.xyz signature database (4byte.directory fallback) and each candidate signature is tried. Unknown selectors return a documented partial decode (selector + raw 32-byte words) instead of an error.

POST https://agent402.tools/api/calldata-decode

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
186 ms typical, 186 ms slowest 5%
Last check
12 min ago
Next check
in 15 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/calldata-decode" \
  -H "content-type: application/json" \
  -d '{"data":"0xa9059cbb000000000000000000000000abf4fabd7c416fb67202e5f9002389fc75e2a9d000000000000000000000000000000000000000000000000000000000000f4240"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fcalldata-decode
const res = await pay("https://agent402.tools/api/calldata-decode", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"data":"0xa9059cbb000000000000000000000000abf4fabd7c416fb67202e5f9002389fc75e2a9d000000000000000000000000000000000000000000000000000000000000f4240"}),
});
console.log(await res.json());

Example input

{
  "data": "0xa9059cbb000000000000000000000000abf4fabd7c416fb67202e5f9002389fc75e2a9d000000000000000000000000000000000000000000000000000000000000f4240"
}

Example output

{
  "decoded": true,
  "name": "transfer",
  "params": [
    {
      "name": null,
      "type": "address",
      "value": "0xabf4fabd7c416fb67202e5f9002389fc75e2a9d0"
    },
    {
      "name": null,
      "type": "uint256",
      "value": "1000000"
    }
  ],
  "selector": "0xa9059cbb",
  "signature": "transfer(address,uint256)",
  "source": "openchain.xyz"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
12 min agoPassed402186 ms$0.003
5 h agoPassed402223 ms$0.003