# ZoneId.toChainId

Derives a zone chain ID from a zone ID.

Zone chain IDs use the base and range assigned to their Tempo source chain.

## Imports

:::code-group
```ts [Named]
import { ZoneId } from 'ox/tempo'
```

```ts [Entrypoint]
import * as ZoneId from 'ox/tempo/ZoneId'
```
:::

## Examples

```ts twoslash
import { ZoneId } from 'ox/tempo'

const chainId = ZoneId.toChainId(1)
// @log: 421700001
```

## Definition

```ts
function toChainId(
  zoneId: number,
  sourceId?: SourceId,
): number
```

**Source:** [src/tempo/ZoneId.ts](https://github.com/wevm/ox/blob/main/src/tempo/ZoneId.ts#L69)

## Parameters

### zoneId

* **Type:** `number`

The zone ID.

### sourceId

* **Type:** [`SourceId`](/tempo/reference/ZoneId/types#zoneidsourceid)
* **Optional**

The Tempo source chain ID. Defaults to `4217` (Presto).

## Return Type

The zone chain ID.

`number`
