Skip to main content

getReadOnlyProvider() function

Signature:

export declare function getReadOnlyProvider(
network: string,
chainId?: number,
): ethers.providers.BaseProvider;

Parameters

ParameterTypeDescription
networkstringthe chain name or rpc url
chainIdnumber(Optional) the optional chain id

Returns:

ethers.providers.BaseProvider

the provider