> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_call | Arc

> Arc API method that executes a new message call immediately without creating a transaction on the blockchain. Arc via Chainstack.

Arc API method that executes a new message call immediately without creating a transaction on the blockchain. This is commonly used to read data from smart contracts, such as ERC-20 token balances.

## Parameters

* `callObject` — the call object:
  * `from` — (optional) address the call is sent from
  * `to` — the address the call is directed to
  * `gas` — (optional) gas provided for the call
  * `gasPrice` — (optional) gas price for the call
  * `value` — (optional) value sent with the call
  * `data` — (optional) hash of the method signature and encoded parameters
* `blockParameter` — the block number (hex) or tag (`latest`, `earliest`, `pending`)

### State override (optional)

`eth_call` accepts an optional third parameter: a state override set that changes account state for this call only. Nothing is written to the chain. The set is an object keyed by account address, and each address can override:

* `balance` — the account balance in wei, hex-encoded
* `nonce` — the account nonce, hex-encoded
* `code` — the bytecode to run at the address
* `state` — storage slot values that replace the account's entire storage
* `stateDiff` — storage slot values to change, keeping the rest of the storage

This example puts bytecode that returns `42` at an unused address, then calls that address:

```bash theme={"system"}
curl --request POST \
  --url CHAINSTACK_NODE_URL \
  --header 'Content-Type: application/json' \
  --data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_call",
    "params": [
      { "to": "0x00000000000000000000000000000000c0ffee42", "data": "0x" },
      "latest",
      { "0x00000000000000000000000000000000c0ffee42": { "code": "0x602a60005260206000f3" } }
    ]
  }'
```

```json theme={"system"}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x000000000000000000000000000000000000000000000000000000000000002a"
}
```

## Response

* `result` — the return value of the executed contract call

## `eth_call` code examples

The following example queries the `balanceOf` function on the USDC ERC-20 token contract:

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const ethers = require('ethers');
  const NODE_URL = "CHAINSTACK_NODE_URL";
  const provider = new ethers.JsonRpcProvider(NODE_URL);

  // USDC token address
  const USDC = "0x3600000000000000000000000000000000000000";

  const getBalance = async (address) => {
      const abi = ["function balanceOf(address) view returns (uint256)"];
      const token = new ethers.Contract(USDC, abi, provider);
      const balance = await token.balanceOf(address);
      // USDC uses 6 decimals
      console.log(`USDC balance: ${ethers.formatUnits(balance, 6)}`);
    };

  getBalance("0x9729187D9E8Bbefa8295F39f5634cA454dd9d294");
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3

  node_url = "CHAINSTACK_NODE_URL"
  web3 = Web3(Web3.HTTPProvider(node_url))

  # USDC token address
  USDC = "0x3600000000000000000000000000000000000000"

  # balanceOf function signature: keccak256("balanceOf(address)")[:4]
  # Plus address padded to 32 bytes
  address = "0x9729187D9E8Bbefa8295F39f5634cA454dd9d294"
  data = "0x70a082310000000000000000000000009729187d9e8bbefa8295f39f5634ca454dd9d294"

  result = web3.eth.call({
      'to': USDC,
      'data': data
  })

  balance = int(result.hex(), 16) / 10**6  # USDC uses 6 decimals
  print(f"USDC balance: {balance}")
  ```

  ```bash cURL theme={"system"}
  curl -X POST "CHAINSTACK_NODE_URL" \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "method": "eth_call",
      "params": [
        {
          "to": "0x3600000000000000000000000000000000000000",
          "data": "0x70a082310000000000000000000000009729187d9e8bbefa8295f39f5634ca454dd9d294"
        },
        "latest"
      ],
      "id": 1
    }'
  ```
</CodeGroup>


## OpenAPI

````yaml openapi/arc_node_api/execute_transactions/eth_call.json POST /
openapi: 3.0.0
info:
  title: Chainstack Node API
  version: 1.0.0
  description: This is an API for interacting with a Chainstack node.
servers:
  - url: https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c
security: []
paths:
  /:
    post:
      tags:
        - upload
      summary: eth_call
      operationId: eth_call
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_call
                params:
                  type: array
                  default:
                    - from: '0x5d20879655df3c1e04ab111af0009ad650e762f0'
                      to: '0x5d20879655df3c1e04ab111af0009ad650e762f0'
                      data: 0x
                    - latest
      responses:
        '200':
          description: Returns the result of eth_call.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
              example:
                jsonrpc: '2.0'
                id: 1
                result: 0x

````