# Gas

### eth\_feeHistory <a href="#eth_feehistory" id="eth_feehistory"></a>

가스당 기본 수수료와, 가능한 경우 요청된 블록 범위에 대한 가스 내역당 트랜잭션 유효 급행 수수료를 반환합니다.

**매개변수**

| 이름                | 타입              | 설명                                                                                                                       |
| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------ |
| blockCount        | QUANTITY        | 요청된 범위의 블록 수를 16진수로 표시합니다. 단일 쿼리로 1(0x1)에서 1024(0x400) 사이의 블록을 요청할 수 있습니다. 모든 블록을 사용할 수 없는 경우 요청한 것보다 적은 블록이 반환될 수 있습니다. |
| lastBlock         | QUANTITY \| TAG | 요청된 범위의 가장 높은 블록의 블록 번호 또는 블록 태그를 반환합니다.                                                                                 |
| rewardPercentiles | Array of FLOAT  | 0에서 100 사이의 부동 소수점 값 배열입니다.                                                                                              |

**리턴값**

| 이름            | 타입                | 설명                                                                              |
| ------------- | ----------------- | ------------------------------------------------------------------------------- |
| oldestBlock   | QUANTITY          | 반환된 범위 내 가장 낮은 블록 번호를 16진수로 표시합니다.                                              |
| baseFeePerGas | Array of QUANTITY | 가스당 블록 기본 수수료의 배열입니다. 이 값은 최신 블록에서 파생될 수 있으므로, 반환된 범위 중 가장 최신 블록의 다음 블록도 포함됩니다. |
| gasUsedRatio  | Array of FLOAT    | 블록의 가스 사용 비율의 배열입니다. 이는 가스 사용량과 가스 리밋의 비율로 계산됩니다.                               |
| reward        | Array of QUANTITY | 단일 블록의 가스 데이터 포인트당 유효 급행 수수료의 배열입니다. 블록이 비어 있으면 모두 0을 반환합니다.                    |

**예시**

```shell
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x10", "latest", [0.1, 0.2, 0.3]],"id":1}' http://localhost:8551

// Result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "oldestBlock": "0xa5b",
    "reward": [
      [
        "0x0",
        "0x0",
        "0x0"
      ],
      [
        "0x0",
        "0x0",
        "0x0"
      ],
      [
        "0x0",
        "0x0",
        "0x0"
      ],
      [
        "0x0",
        "0x0",
        "0x0"
      ],
      [
        "0x0",
        "0x0",
        "0x0"
      ],
      [
        "0x5d21dba00",
        "0x5d21dba00",
        "0x5d21dba00"
      ],
      [
        "0x0",
        "0x0",
        "0x0"
      ],
      [
        "0x0",
        "0x0",
        "0x0"
      ],
      [
        "0x5d21dba00",
        "0x5d21dba00",
        "0x5d21dba00"
      ],
      [
        "0x0",
        "0x0",
        "0x0"
      ],
      [
        "0x0",
        "0x0",
        "0x0"
      ],
      [
        "0x5d21dba00",
        "0x5d21dba00",
        "0x5d21dba00"
      ],
      [
        "0x0",
        "0x0",
        "0x0"
      ],
      [
        "0x0",
        "0x0",
        "0x0"
      ],
      [
        "0x0",
        "0x0",
        "0x0"
      ],
      [
        "0x0",
        "0x0",
        "0x0"
      ]
    ],
    "baseFeePerGas": [
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0",
      "0x0"
    ],
    "gasUsedRatio": [
      0,
      0,
      0,
      0,
      0,
      0.0002952004000002952,
      0,
      0,
      0.00029504250000029504,
      0,
      0,
      0.0002963777000002964,
      0,
      0,
      0,
      0
    ]
  }
}
```

### eth\_maxPriorityFeePerGas <a href="#eth_maxpriorityfeepergas" id="eth_maxpriorityfeepergas"></a>

동적 수수료 트랜잭션의 가스 팁 상한에 대한 제안을 peb 단위로 반환합니다.

**참고**: 이더리움에서 권장 가스비를 반환하던 것과 달리 Klaytn에서는 현재 가스비를 반환하는 형태로, 이더리움과 다르게 동작하는 API 입니다.

**매개변수**

없음

**리턴값**

| 타입       | 설명                           |
| -------- | ---------------------------- |
| QUANTITY | peb의 현재 가스 가격을 정수 형태로 반환합니다. |

**예시**

```shell
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params":[],"id":1}' http://localhost:8551

// Result
{
  "jsonrpc": "2.0",
  "id":1)
  "result": "0xAE9F7BCC00" // 250,000,000,000 peb = 250 ston (Gwei)
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://archive-ko.docs.klaytn.foundation/content/dapp/json-rpc/api-references/eth/gas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
