# Ethereum Calldata Decoder & Function Selector Calculator

> Ethereum Calldata Decoder & Function Selector Calculator is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

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.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/eth-calldata-decode
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ethereum-calldata-decoder-function-selector-calculator-d4522cff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yMCOLBXZmW2szsHqzZ7gH

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ethereum-calldata-decoder-function-selector-calculator-d4522cff -d '<json body>'
```

Example prompt: 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'].

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "signature": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "selector": "0xa9059cbb"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ethereum-calldata-decoder-function-selector-calculator-d4522cff/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
