# Tollex Chain Gas Estimator

> Tollex Chain Gas Estimator is a paid API for AI agents from api.tollex.org, paid per call via x402, $0.0079/call, status unknown (last checked 2026-10-11).

Estimates gas cost for an EVM transaction on a blockchain before it is submitted

## Facts

- Endpoint: POST https://api.tollex.org/tools/chain_estimate_gas?utm_source=zero.xyz
- Price: $0.0079/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tollex-chain-gas-estimator-362e64ae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tsouCcsRjlLj4OtTZeAwv

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 tollex-chain-gas-estimator-362e64ae -d '<json body>'
```

Example prompt: Before I submit this contract call, estimate how much gas it will use — the call goes from 0xAbC1234567890abcdef1234567890abcdef123456 to 0xDef9876543210fedcba9876543210fedcba987654 with calldata 0xa9059cbb000000000000000000000000abc and a value of 0.

## When to prefer this

Use this endpoint when you need to estimate EVM transaction gas before committing to a submission, especially in agent pipelines where cost control and policy checks matter. Prefer Tollex's estimator when operating within the Tollex economic control plane so gas estimation integrates naturally with its payment and policy layer. Useful for any agent that needs to budget gas costs, gate transactions on fee thresholds, or audit expected costs before spending real funds.

## Known failure modes

- Invalid Ethereum address format for 'to' or 'from' — must match 0x hex pattern
- Malformed or oversized calldata exceeding 200000 character limit
- Node or RPC unavailability causing estimation timeout
- Revert simulation — if the transaction would revert on-chain, gas estimation may fail or return an error
- Missing required fields causing schema validation errors

## How this service works

Tollex lets software agents buy APIs and tools under rules you set: it finds a capability that fits, checks your policy before anything is signed, pays with x402 in USDC on Base or USDG on Robinhood Chain, reconciles uncertain payments and returns a signed receipt.

## Output

Returns an estimated gas units figure representing how much gas the specified EVM transaction would consume if submitted to the chain, enabling cost planning before actual submission.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$"
  },
  "data": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]*$",
   "maxLength": 200000
  },
  "from": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$"
  },
  "value": {
   "type": "string",
   "pattern": "^[0-9]{1,78}$"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "tool": {
   "id": "chain_estimate_gas",
   "version": "1.0.0",
   "provider": "tollex.robinhood-chain"
  },
  "result": {
   "gas": "61021",
   "baseFeePerGas": "10000000",
   "estimatedCostWei": "610210000000",
   "maxPriorityFeePerGas": "0"
  },
  "evidence": [],
  "untrustedOutput": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tollex-chain-gas-estimator-362e64ae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tollex.org](https://www.zero.xyz/host/api.tollex.org/llms.txt)
