Network identifier (CAIP-2 format) or ProviderOptions object
Optionaloptions: Omit<ProviderOptions, "network">Optional provider options (only used if first argument is a network string)
Configured public client
// Simple usage with default RPC
const client = createPublicClient('eip155:8453');
// With custom RPC URL
const client = createPublicClient('eip155:1', {
rpcUrl: 'https://your-rpc-endpoint.com',
});
// Using ProviderOptions object
const client = createPublicClient({
network: 'eip155:8453',
rpcUrl: 'https://custom-rpc.com',
timeout: 60000,
});
Create a public client for reading from the blockchain