> For the complete documentation index, see [llms.txt](https://whs3-doge5k.gitbook.io/smartcontract-security-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whs3-doge5k.gitbook.io/smartcontract-security-docs/basics/6.-foundry/cast/cast-block.md).

# cast block

## 블록 정보 조회

`cast block` 명령어는 특정 블록 번호 또는 블록 해시에 대한 정보를 조회하는 기능을 제공한다.\
블록에 포함된 트랜잭션과 기타 메타데이터를 확인할 수 있다.

***

### 명령어 형식

```bash
$ cast block <블록 번호 또는 해시> --rpc-url <rpc-url>
```

* <블록 번호>: 정수형 숫자 (latest, earliest, pending도 사용 가능)

***

### 출력 정보

* **블록 해시**
* **블록 번호**
* **채굴자 주소**
* **Timestamp** (Unix 시간)
* **Gas 사용량 및 한도**
* **포함된 트랜잭션 목록**

***

### 예시

이전 cast tx로 확인했던 트랜잭션이 포함된 블록 번호 8441557의 정보를 조회해보자:

```bash
$ cast block 8441557 --rpc-url <rpc url>
```

> 블록 번호 대신 블록 해시도 사용 가능하다
