Chains
Use @orderly.network/hooks
to get the chains that are supported by Orderly.
useChains
Use chains
import { useChains } from "@orderly.network/hooks";
const [chains, { findByChainId }] = useChains();
The findByChainId
function can be used to get the config of a particular chain by the chain id.
import { useChains } from "@orderly.network/hooks";
const [_, { findByChainId }] = useChains();
const chain = findByChainId(421613);
Example
() => { const [chains] = useChains(); return ( <div> <pre>{JSON.stringify(chains, null, 2)}</pre> </div> ); };