---
title: "Read Contract"
method: POST
path: "/v1/contracts/read"
tags: ["Wallets"]
---

# Read Contract

`POST /v1/contracts/read`

Executes multiple read-only contract method calls in a single batch request. This endpoint allows efficient batch reading from multiple contracts on the same chain, significantly reducing the number of HTTP requests needed. Each call specifies the contract address, method signature, and optional parameters. Results are returned in the same order as the input calls, with individual success/failure status for each operation.

**Authentication**: Pass `x-client-id` header for frontend usage from allowlisted origins or `x-secret-key` for backend usage.

## Request body

- object
  - `calls` object[], required — Array of contract method calls to execute. Each call specifies a contract address, method signature, and optional parameters.
    - `contractAddress` string, required — The smart contract address or ENS name.
    - `method` string, required — The contract function signature to call (e.g., 'function approve(address spender, uint256 amount)' or `function balanceOf(address)`). Must start with 'function' followed by the function name and parameters as defined in the contract ABI. For functions returning arrays of structs, use positional types only in the return declaration (e.g., `returns ((uint256, address, bool)[])` instead of `returns ((uint256 id, address owner, bool active)[] items)`).
    - `params` unknown[] — Array of parameters to pass to the contract method, in the correct order and format.
      - unknown
    - `value` string — Amount of native token to send with the transaction in wei. Required for payable methods.
  - `chainId` integer, required — The blockchain network identifier. Common values include: 1 (Ethereum), 8453 (Base), 137 (Polygon), 56 (BSC), 43114 (Avalanche), 42161 (Arbitrum), 10 (Optimism).

## Response `200`

Contract read operations completed successfully. Returns an array of results corresponding to each input call, including both successful and failed operations.

- object
  - `result` object[], required — Array of results corresponding to each contract read call. Results are returned in the same order as the input calls.
    - `data` unknown
    - `error` string — Error message if the contract read operation failed.
    - `success` boolean, required — Indicates whether the contract read operation was successful.

## Other responses

- `400` — Invalid request parameters. This occurs when the chainId is not supported, contract addresses are invalid, function signatures are malformed, or the calls array is empty.
- `401` — Authentication required. The request must include a valid `x-client-id` header for frontend usage or `x-secret-key` for backend usage.
- `500` — Internal server error. This may occur due to engine connectivity issues, RPC node unavailability, or unexpected server errors.

---

[API](https://skmtc.net/thirdweb/apis/thirdweb-api.md) · [All operations](https://skmtc.net/thirdweb/apis/thirdweb-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thirdweb/thirdweb-api/revisions/fb4cb67da1c7/schema)
