{
  "openapi": "3.1.0",
  "info": {
    "title": "eth_estimateGas",
    "version": "2.0.0",
    "description": "Estimate the gas required for a transaction.",
    "license": {
      "name": "Etherscan API Terms",
      "url": "https://etherscan.io/terms"
    }
  },
  "servers": [
    {
      "url": "https://api.etherscan.io",
      "description": "Etherscan API."
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/v2/api": {
      "get": {
        "operationId": "getEthestimategas",
        "summary": "eth_estimateGas",
        "description": "Estimate the gas required for a transaction.",
        "parameters": [
          {
            "name": "chainid",
            "in": "query",
            "required": true,
            "description": "Chain ID to query, eg 1 for Ethereum, 8453 for Base from our supported chains.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "module",
            "in": "query",
            "required": true,
            "description": "Set to proxy for this endpoint.",
            "schema": {
              "type": "string",
              "default": "proxy"
            },
            "example": "proxy"
          },
          {
            "name": "action",
            "in": "query",
            "required": true,
            "description": "Set to eth_estimateGas for this endpoint.",
            "schema": {
              "type": "string",
              "default": "eth_estimateGas"
            },
            "example": "eth_estimateGas"
          },
          {
            "name": "data",
            "in": "query",
            "required": false,
            "description": "Hash of the method signature and encoded parameters.",
            "schema": {
              "type": "string"
            },
            "example": "0x4e71d92d"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "The address to interact with.",
            "schema": {
              "type": "string"
            },
            "example": "0xf0160428a8552ac9bb7e050d90eeade4ddd52843"
          },
          {
            "name": "value",
            "in": "query",
            "required": false,
            "description": "Value sent in this transaction, in hex.",
            "schema": {
              "type": "string"
            },
            "example": "0xff22"
          },
          {
            "name": "gasPrice",
            "in": "query",
            "required": false,
            "description": "Gas price in wei.",
            "schema": {
              "type": "string"
            },
            "example": "0x51da038cc"
          },
          {
            "name": "gas",
            "in": "query",
            "required": false,
            "description": "Gas limit provided for the transaction, in hex.",
            "schema": {
              "type": "string"
            },
            "example": "0x5f5e0ff"
          }
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-mint": {
          "metadata": {
            "title": "eth_estimateGas",
            "description": "Estimate the gas required for a transaction."
          }
        },
        "x-etherscan-source-page": {
          "page": "api-reference/endpoint/ethestimategas",
          "title": "eth_estimateGas",
          "module": "proxy",
          "action": "eth_estimateGas"
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "query",
        "name": "apikey",
        "description": "Your Etherscan API key."
      }
    }
  }
}