> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstream.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 블록 및 트랜잭션

> Blocks, Transactions, Events, Calls 및 기타 인프라 Cubes에 대한 쿼리 예제

## 개요

이 페이지는 블록체인 인프라 Cube에 대한 쿼리 예시를 다룹니다 — 블록, 트랜잭션, 스마트 컨트랙트 이벤트, 내부 trace 등 기초 데이터입니다.

***

## Blocks

### 최신 블록 (Solana)

```graphql theme={null}
query {
  Solana {
    Blocks(limit: {count: 10}, orderBy: {descending: Block_Time}) {
      Block {
        Time
        Slot
        Height
        Hash
        ParentSlot
        TxCount
      }
    }
  }
}
```

### 최신 블록 (Ethereum)

```graphql theme={null}
query {
  EVM(network: eth) {
    Blocks(limit: {count: 10}, orderBy: {descending: Block_Time}) {
      Block {
        Time
        Number
        Hash
        GasUsed
        GasLimit
        BaseFee
        TxCount
        Coinbase
      }
    }
  }
}
```

***

## Transactions

### 주소별 최근 트랜잭션 (Solana)

```graphql theme={null}
query {
  Solana {
    Transactions(
      signer: {is: "WALLET_ADDRESS"}
      limit: {count: 20}
      orderBy: {descending: Block_Time}
    ) {
      Block { Time Slot }
      Transaction {
        Signature
        Fee
        FeePayer
        Result { Success }
      }
    }
  }
}
```

### 주소별 최근 트랜잭션 (EVM)

```graphql theme={null}
query {
  EVM(network: eth) {
    Transactions(
      fromAddress: {is: "0xWALLET_ADDRESS"}
      limit: {count: 20}
      orderBy: {descending: Block_Time}
    ) {
      Block { Time Number }
      Transaction {
        Hash
        From
        To
        Value
        Gas
        GasPrice
      }
    }
  }
}
```

***

## Events (EVM 전용)

### 컨트랙트와 토픽으로 이벤트 필터

```graphql theme={null}
query {
  EVM(network: eth) {
    Events(
      contractAddress: {is: "0xCONTRACT_ADDRESS"}
      limit: {count: 20}
      orderBy: {descending: Block_Time}
    ) {
      Block { Time Number }
      Transaction { Hash }
      Log {
        SmartContract
        Index
        Signature { Name Signature }
        Data
      }
    }
  }
}
```

### 이벤트 시그니처(Topic0)로 필터

```graphql theme={null}
query {
  EVM(network: eth) {
    Events(
      topic0: {is: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"}
      limit: {count: 10}
      orderBy: {descending: Block_Time}
    ) {
      Block { Time }
      Transaction { Hash }
      Log { SmartContract Index Data }
    }
  }
}
```

***

## Calls / Traces (EVM 전용)

### 컨트랙트로의 내부 호출

```graphql theme={null}
query {
  EVM(network: eth) {
    Calls(
      toAddress: {is: "0xCONTRACT_ADDRESS"}
      limit: {count: 20}
      orderBy: {descending: Block_Time}
    ) {
      Block { Time Number }
      Transaction { Hash }
      Call {
        From
        To
        Opcode
        Value
        Gas
        GasUsed
        Signature { Name }
      }
    }
  }
}
```

***

## Instructions (Solana 전용)

### 프로그램의 최근 인스트럭션

```graphql theme={null}
query {
  Solana {
    Instructions(
      programId: {is: "PROGRAM_ADDRESS"}
      limit: {count: 20}
      orderBy: {descending: Block_Time}
    ) {
      Block { Time Slot }
      Transaction { Signature }
      Instruction {
        Index
        Depth
        Program { Address Name Method }
        Accounts
      }
    }
  }
}
```

***

## Rewards (Solana 전용)

### 검증자의 스테이킹 보상

```graphql theme={null}
query {
  Solana {
    Rewards(
      address: {is: "VALIDATOR_ADDRESS"}
      limit: {count: 50}
      orderBy: {descending: Block_Time}
    ) {
      Block { Time Slot }
      Reward {
        Address
        Amount
        AmountInUSD
        PostBalance
        RewardType
        Commission
      }
    }
  }
}
```

***

## Miner Rewards (EVM 전용)

### 블록 보상 내역

```graphql theme={null}
query {
  EVM(network: eth) {
    MinerRewards(
      limit: {count: 20}
      orderBy: {descending: Block_Time}
    ) {
      Block { Time Number }
      Reward {
        Miner
        TotalReward
        TotalRewardInUSD
        StaticReward
        DynamicReward
        TxFees
        BurntFees
      }
    }
  }
}
```

***

## 관련 문서

<CardGroup cols={2}>
  <Card title="데이터 Cube" icon="cubes" href="/ko/graphql/schema/cubes">
    Blocks, Transactions, Events, Calls를 포함한 모든 Cube의 필드 구조 상세.
  </Card>

  <Card title="체인 그룹" icon="layer-group" href="/ko/graphql/schema/chain-groups">
    EVM과 Solana에서 사용 가능한 Cube 이해.
  </Card>
</CardGroup>
