Skip to content

useEVMChain

Gets the EVM chain associated with the current Bitcoin network.

Import

ts
import { useEVMChain } from "@midl/executor-react";

Example

ts
const evmChain = useEVMChain();
if (evmChain) {
  console.log(`EVM Chain Name: ${evmChain.name}`);
}

Parameters

NameTypeDescription
configConfig(optional) Custom configuration to override the default.
chainChain(optional) Custom EVM chain to override the default.

Returns

NameTypeDescription
evmChainChain | nullThe EVM chain configuration if available, otherwise null.