useChainId
Callable
Type parameters
- TAllowList: ChainId[]
- TDenylist: ChainId[] = []
Parameters
optionaloptions: { allowlist?: TAllowList; denylist?: TDenylist }
Additional options
optionalallowlist: TAllowList
optionaldenylist: TDenylist
Returns Exclude<Extract<ChainId, TAllowList[number]>, TDenylist[number]>
The current chain ID
Hook for getting the current chain ID.