> ## 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_estimateGas | Tempo

> Tempo API method that estimates the gas needed to execute a transaction. On Tempo, gas fees are paid in TIP-20 stablecoins, not a native token.

Tempo API method that estimates the gas needed to execute a transaction. On Tempo, gas fees are paid in TIP-20 stablecoins, not a native token.

## Parameters

* `callObject` — the call object:
  * `from` — (optional) address the transaction is sent from
  * `to` — (optional) address the transaction is directed to
  * `gas` — (optional) gas provided for the transaction
  * `gasPrice` — (optional) gas price
  * `value` — (optional) value sent with the transaction
  * `data` — (optional) hash of the method signature and encoded parameters

## Response

* `result` — the estimated gas amount encoded as hexadecimal

## `eth_estimateGas` code examples

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

  const estimateGas = async () => {
      const gas = await provider.estimateGas({
        from: "0x9729187D9E8Bbefa8295F39f5634cA454dd9d294",
        to: "0x20c0000000000000000000000000000000000000",
        data: "0x70a082310000000000000000000000009729187d9e8bbefa8295f39f5634ca454dd9d294"
      });
      console.log(`Estimated gas: ${gas}`);
    };

  estimateGas();
  ```

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

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

  gas = web3.eth.estimate_gas({
      'from': "0x9729187D9E8Bbefa8295F39f5634cA454dd9d294",
      'to': "0x20c0000000000000000000000000000000000000",
      'data': "0x70a082310000000000000000000000009729187d9e8bbefa8295f39f5634ca454dd9d294"
  })
  print(f"Estimated gas: {gas}")
  ```

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


## OpenAPI

````yaml openapi/tempo_node_api/gas_data/eth_estimateGas.json POST /
openapi: 3.0.0
info:
  title: eth_estimateGas Tempo example
  version: 1.0.0
  description: This is an API example for eth_estimateGas for Tempo.
servers:
  - url: https://tempo-mainnet.core.chainstack.com/c3ce2925b51f1ed18719fe8a23bbdccf
security: []
paths:
  /:
    post:
      tags:
        - Gas data
      summary: eth_estimateGas
      operationId: tempo-eth-estimateGas
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_estimateGas
                params:
                  type: array
                  items: {}
                  default:
                    - from: '0x9729187D9E8Bbefa8295F39f5634cA454dd9d294'
                      to: '0x20c0000000000000000000000000000000000000'
                      data: >-
                        0x70a082310000000000000000000000009729187d9e8bbefa8295f39f5634ca454dd9d294
                  description: Transaction call object
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: The estimated gas
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
                    description: The estimated gas amount encoded as hexadecimal

````