Skip to content

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

Named
import { ZoneId } from 'ox/tempo'

Examples

import { ZoneId } from 'ox/tempo'
 
const chainId = ZoneId.toChainId(1)
421700001

Definition

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

Source: src/tempo/ZoneId.ts

Parameters

zoneId

  • Type: number

The zone ID.

sourceId

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

Return Type

The zone chain ID.

number