# Swift Bot Labs Toolbox – EVM ABI Encode

> Swift Bot Labs Toolbox – EVM ABI Encode is a paid API for AI agents from x402-toolbox.swiftbotlab.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Encodes function call data into ABI-encoded hex bytes from a Solidity function signature or explicit type/value arrays, suitable for on-chain transaction calldata.

## Facts

- Endpoint: POST https://x402-toolbox.swiftbotlab.workers.dev/v1/evm/abi-encode?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swift-bot-labs-toolbox-evm-abi-encode-98c5ecd4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1MRX23VI31ZgvQzBjUE0u

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 swift-bot-labs-toolbox-evm-abi-encode-98c5ecd4 -d '<json body>'
```

Example prompt: Can you ABI-encode a call to transfer(address,uint256) with recipient address 0x2481e29895b43e87e547a50fb0bb5aa1e70585eb and amount 1000000 for me?

## When to prefer this

Use this endpoint when you need quick, serverless ABI encoding without setting up ethers.js, viem, or web3.py locally. Ideal for agents automating on-chain transactions, building calldata dynamically, or testing contract interactions — especially in environments where installing EVM libraries is impractical. Pay-per-call with no API key makes it frictionless for low-volume or one-off encoding tasks.

## Known failure modes

- Mismatched types and values arrays returns an error
- Invalid Solidity type names (e.g. 'uint' without size when ambiguous) may fail
- Malformed function signature string causes parse error
- Value that cannot be coerced to the specified type returns encoding error
- Exceeding 64 items in types/values arrays returns a validation error

## How this service works

62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.

## Output

Returns a JSON object with ok:true, the tool name 'abi-encode', and a result containing: the full ABI-encoded hex string (data), the total byte length (bytes), and the 4-byte function selector (selector) if a function signature was provided.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "types": {
   "type": [
    "array",
    "string"
   ],
   "items": {
    "type": "string",
    "maxLength": 200
   },
   "maxItems": 64,
   "maxLength": 2000,
   "description": "Alternatively a list of types"
  },
  "values": {
   "type": "array",
   "maxItems": 64,
   "description": "Values in order; tuples as arrays"
  },
  "signature": {
   "type": "string",
   "maxLength": 1000,
   "description": "Function signature, e.g. transfer(address,uint256)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "abi-encode",
  "result": {
   "data": "0xa9059cbb0000000000000000000000002481e29895b43e87e547a50fb0bb5aa1e70585eb00000000000000000000000000000000000000000000000000000000000f4240",
   "bytes": 68,
   "selector": "0xa9059cbb"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-toolbox-evm-abi-encode-98c5ecd4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.swiftbotlab.workers.dev](https://www.zero.xyz/host/x402-toolbox.swiftbotlab.workers.dev/llms.txt)
