mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* update hooks and methods * fix typescript * options fix * fix pw test build * try to fix tests * more pw test fixes * update screenshots and fix address verification test
20 lines
396 B
TypeScript
20 lines
396 B
TypeScript
import { createPublicClient, http } from 'viem';
|
|
|
|
import currentChain from './currentChain';
|
|
|
|
export const publicClient = (() => {
|
|
if (currentChain.rpcUrls.default.http.filter(Boolean).length === 0) {
|
|
return;
|
|
}
|
|
|
|
try {
|
|
return createPublicClient({
|
|
chain: currentChain,
|
|
transport: http(),
|
|
batch: {
|
|
multicall: true,
|
|
},
|
|
});
|
|
} catch (error) {}
|
|
})();
|