> ## Documentation Index
> Fetch the complete documentation index at: https://daehan-base.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Base RPC 개요

> Base 노드에서 사용할 수 있는 모든 JSON-RPC 및 Flashblocks 메서드에 대한 전체 레퍼런스입니다.

Base는 두 가지 성능 티어에서 완전히 EVM 호환인 단일 JSON-RPC API를 제공합니다. URL 하나와 block tag 하나만 바꾸면 2초 블록 확정에서 200ms 사전 확인(pre-confirmation)으로 전환할 수 있습니다.

## 네트워크

| 네트워크    | Chain ID | 유형   | Archive 지원 |
| :------ | :------- | :--- | :--------- |
| Mainnet | `8453`   | 프로덕션 | 예          |
| Sepolia | `84532`  | 테스트넷 | 예          |

## 엔드포인트

<Tabs>
  <Tab title="Mainnet">
    | 티어          | HTTP                               | WSS                              |
    | :---------- | :--------------------------------- | :------------------------------- |
    | Standard    | `https://mainnet.base.org`         | `wss://mainnet.base.org`         |
    | Flashblocks | `https://mainnet-preconf.base.org` | `wss://mainnet-preconf.base.org` |
  </Tab>

  <Tab title="Sepolia">
    | 티어          | HTTP                               | WSS                              |
    | :---------- | :--------------------------------- | :------------------------------- |
    | Standard    | `https://sepolia.base.org`         | `wss://sepolia.base.org`         |
    | Flashblocks | `https://sepolia-preconf.base.org` | `wss://sepolia-preconf.base.org` |
  </Tab>
</Tabs>

<Info>
  위 공개 엔드포인트에는 rate limit이 적용되므로 프로덕션 트래픽에는 적합하지 않습니다. 프로덕션에서는 [노드 제공업체](/base-chain/node-operators/node-providers)를 통해 연결하세요.
</Info>

## What is the Flashblocks Tier?

Flashblocks 엔드포인트는 완전히 EVM 동등하며, 모든 표준 `eth_` 메서드가 동일하게 동작합니다. 차이는 `pending` block tag가 무엇을 반환하느냐에 있습니다.

* **Standard** 엔드포인트에서 `pending`은 트랜잭션 풀(미채굴 상태)을 반영합니다.
* **Flashblocks** 엔드포인트에서 `pending`은 현재 진행 중인 **사전 확인 블록**을 반영하며, 시퀀서가 정렬한 트랜잭션 배치가 들어올 때마다 약 200ms마다 갱신됩니다.

`eth_getBalance`, `eth_getStorageAt`, `eth_call` 같은 호출은 블록이 seal되기 최대 1.8초 전의 실제 시퀀서 상태를 기준으로 실행되며, 지연 시간은 1초 미만입니다.

## API 레퍼런스

### Ethereum JSON-RPC API

계정 조회, 블록 및 트랜잭션 데이터 조회, 가스 추정, 로그 필터링에 사용하는 핵심 Ethereum 프로토콜 메서드입니다. 모든 메서드는 Standard와 Flashblocks 엔드포인트에서 모두 동작합니다.

<Info>
  ✓ 표시가 있는 메서드는 Flashblocks 엔드포인트에서 `"pending"` block tag를 지원합니다.
</Info>

| 메서드                                                                                                                                 | 설명                       | Flashblocks `pending` |
| :---------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | :-------------------- |
| [eth\_blockNumber](/base-chain/api-reference/ethereum-json-rpc-api/eth_blockNumber)                                                 | 현재 블록 번호                 | —                     |
| [eth\_getBalance](/base-chain/api-reference/ethereum-json-rpc-api/eth_getBalance)                                                   | 계정 ETH 잔액                | ✓                     |
| [eth\_getTransactionCount](/base-chain/api-reference/ethereum-json-rpc-api/eth_getTransactionCount)                                 | 계정 nonce / 트랜잭션 수        | ✓                     |
| [eth\_getCode](/base-chain/api-reference/ethereum-json-rpc-api/eth_getCode)                                                         | 배포된 컨트랙트 바이트코드           | ✓                     |
| [eth\_getStorageAt](/base-chain/api-reference/ethereum-json-rpc-api/eth_getStorageAt)                                               | 컨트랙트 스토리지 슬롯 값           | ✓                     |
| [eth\_call](/base-chain/api-reference/ethereum-json-rpc-api/eth_call)                                                               | 읽기 전용 호출 실행              | ✓                     |
| [eth\_getBlockByNumber](/base-chain/api-reference/ethereum-json-rpc-api/eth_getBlockByNumber)                                       | 번호로 블록 데이터 조회            | ✓                     |
| [eth\_getBlockByHash](/base-chain/api-reference/ethereum-json-rpc-api/eth_getBlockByHash)                                           | 해시로 블록 데이터 조회            | —                     |
| [eth\_getBlockReceipts](/base-chain/api-reference/ethereum-json-rpc-api/eth_getBlockReceipts)                                       | 블록 내 모든 영수증 조회           | ✓                     |
| [eth\_getBlockTransactionCountByNumber](/base-chain/api-reference/ethereum-json-rpc-api/eth_getBlockTransactionCountByNumber)       | 블록 번호 기준 트랜잭션 수          | ✓                     |
| [eth\_getBlockTransactionCountByHash](/base-chain/api-reference/ethereum-json-rpc-api/eth_getBlockTransactionCountByHash)           | 블록 해시 기준 트랜잭션 수          | —                     |
| [eth\_getTransactionByHash](/base-chain/api-reference/ethereum-json-rpc-api/eth_getTransactionByHash)                               | 해시로 트랜잭션 데이터 조회          | —                     |
| [eth\_getTransactionByBlockHashAndIndex](/base-chain/api-reference/ethereum-json-rpc-api/eth_getTransactionByBlockHashAndIndex)     | 블록 해시와 인덱스로 트랜잭션 조회      | —                     |
| [eth\_getTransactionByBlockNumberAndIndex](/base-chain/api-reference/ethereum-json-rpc-api/eth_getTransactionByBlockNumberAndIndex) | 블록 번호와 인덱스로 트랜잭션 조회      | —                     |
| [eth\_getTransactionReceipt](/base-chain/api-reference/ethereum-json-rpc-api/eth_getTransactionReceipt)                             | 채굴 완료된 트랜잭션 영수증          | —                     |
| [eth\_sendRawTransaction](/base-chain/api-reference/ethereum-json-rpc-api/eth_sendRawTransaction)                                   | 서명된 트랜잭션 제출              | —                     |
| [eth\_gasPrice](/base-chain/api-reference/ethereum-json-rpc-api/eth_gasPrice)                                                       | 현재 가스 가격                 | —                     |
| [eth\_maxPriorityFeePerGas](/base-chain/api-reference/ethereum-json-rpc-api/eth_maxPriorityFeePerGas)                               | 최대 priority fee 추정값      | —                     |
| [eth\_feeHistory](/base-chain/api-reference/ethereum-json-rpc-api/eth_feeHistory)                                                   | 과거 base fee 및 reward 데이터 | —                     |
| [eth\_estimateGas](/base-chain/api-reference/ethereum-json-rpc-api/eth_estimateGas)                                                 | 트랜잭션 가스 추정               | ✓                     |
| [eth\_getLogs](/base-chain/api-reference/ethereum-json-rpc-api/eth_getLogs)                                                         | 필터 기준 이벤트 로그 조회          | ✓                     |
| [eth\_chainId](/base-chain/api-reference/ethereum-json-rpc-api/eth_chainId)                                                         | 네트워크 chain ID            | —                     |
| [eth\_syncing](/base-chain/api-reference/ethereum-json-rpc-api/eth_syncing)                                                         | 노드 동기화 상태                | —                     |
| [net\_version](/base-chain/api-reference/ethereum-json-rpc-api/net_version)                                                         | 네트워크 버전 ID               | —                     |
| [web3\_clientVersion](/base-chain/api-reference/ethereum-json-rpc-api/web3_clientVersion)                                           | 클라이언트 버전 문자열             | —                     |
| [eth\_subscribe](/base-chain/api-reference/ethereum-json-rpc-api/eth_subscribe)                                                     | 이벤트 구독(WSS)              | ✓                     |
| [eth\_unsubscribe](/base-chain/api-reference/ethereum-json-rpc-api/eth_unsubscribe)                                                 | 구독 취소(WSS)               | —                     |

### Flashblocks API

Base에서 서브초 단위 트랜잭션 신호를 다루기 위한 사전 확인 메서드입니다. 이 메서드들은 Flashblocks 엔드포인트에서만 사용할 수 있으며, 블록이 seal되기 최대 약 1.8초 전까지 상태 조회, 번들 시뮬레이션, 이벤트 스트리밍을 지원합니다.

| 메서드                                                                                              | 설명                           |
| ------------------------------------------------------------------------------------------------ | ---------------------------- |
| [eth\_simulateV1](/base-chain/api-reference/flashblocks-api/eth_simulateV1)                      | 사전 확인 상태를 기준으로 트랜잭션 번들 시뮬레이션 |
| [base\_transactionStatus](/base-chain/api-reference/flashblocks-api/base_transactionStatus)      | 트랜잭션이 mempool에 수신되었는지 확인     |
| [newFlashblockTransactions](/base-chain/api-reference/flashblocks-api/newFlashblockTransactions) | 개별 사전 확인 트랜잭션 구독             |
| [pendingLogs](/base-chain/api-reference/flashblocks-api/pendingLogs)                             | 사전 확인 트랜잭션의 필터링된 로그 구독       |
| [newFlashblocks](/base-chain/api-reference/flashblocks-api/newFlashblocks)                       | 전체 Flashblock payload 스트림 구독 |

### Debug API

트랜잭션 상세 분석과 블록 재현을 위한 개발/디버깅 유틸리티입니다. Debug 메서드는 트랜잭션을 재실행하므로 계산 비용이 크며, 사용 가능 여부와 rate limit은 [노드 제공업체](/base-chain/node-operators/node-providers)마다 다를 수 있습니다.

| 메서드                                                                                       | 설명                       |
| ----------------------------------------------------------------------------------------- | ------------------------ |
| [debug\_traceTransaction](/base-chain/api-reference/debug-api/debug_traceTransaction)     | 트랜잭션의 전체 EVM 실행 추적       |
| [debug\_traceBlockByHash](/base-chain/api-reference/debug-api/debug_traceBlockByHash)     | 블록 해시 기준 모든 트랜잭션의 EVM 추적 |
| [debug\_traceBlockByNumber](/base-chain/api-reference/debug-api/debug_traceBlockByNumber) | 블록 번호 기준 모든 트랜잭션의 EVM 추적 |

## 요청 및 응답 형식

모든 요청은 `Content-Type: application/json`을 사용하는 HTTP POST입니다.

| 필드        | 타입               | 설명                 |
| :-------- | :--------------- | :----------------- |
| `jsonrpc` | string           | 항상 `"2.0"`         |
| `method`  | string           | RPC 메서드 이름         |
| `params`  | array            | 순서대로 전달하는 메서드 파라미터 |
| `id`      | number \| string | 응답에 그대로 반환되는 식별자   |

**요청 예시:**

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": ["0x742d35Cc6634C0532925a3b8D4C9dD0b4f3BaEa", "pending"],
  "id": 1
}
```

**성공 응답:**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1a055690d9db80000"
}
```

**오류 응답:**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32602,
    "message": "Invalid params"
  }
}
```

## 오류 코드

| 코드       | 이름               | 설명                      |
| -------- | ---------------- | ----------------------- |
| `-32700` | Parse error      | 유효하지 않은 JSON            |
| `-32600` | Invalid request  | 유효한 JSON-RPC 2.0 객체가 아님 |
| `-32601` | Method not found | 메서드가 없거나 사용할 수 없음       |
| `-32602` | Invalid params   | 잘못된 메서드 파라미터            |
| `-32603` | Internal error   | 내부 JSON-RPC 오류          |
| `-32000` | Server error     | 노드별 오류(메시지 참고)          |

## 블록 파라미터

| Value         | Standard        | Flashblocks                             |
| ------------- | --------------- | --------------------------------------- |
| `"latest"`    | 가장 최근에 seal된 블록 | 가장 최근에 seal된 블록                         |
| `"pending"`   | 미채굴 트랜잭션 풀 상태   | **현재 진행 중인 Flashblock 상태(약 200ms 해상도)** |
| `"safe"`      | 최신 safe 블록      | 최신 safe 블록                              |
| `"finalized"` | 최신 finalized 블록 | 최신 finalized 블록                         |
| `"earliest"`  | 제네시스 블록         | 제네시스 블록                                 |
| `"0x<n>"`     | 번호로 지정한 특정 블록   | 번호로 지정한 특정 블록                           |
