Files
explore/lib/web3/client.ts
T
tom goriunovandGitHub 7dd2cafada update web3modal to v4 (#1731)
* 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
2024-03-25 08:41:20 +01:00

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) {}
})();