Skip to content

toReadClient

toReadClient<TChain>(client): Client<Transport, TChain, undefined>

Defined in: packages/synapse-core/src/utils/read-client.ts:11

Return a client suitable for read-only RPC calls.

Viem uses a client’s account as the default from address for eth_call. Filecoin rejects calls from contract accounts and undeployed addresses during sender pre-validation, even when the call is read-only. This adapter keeps the configured chain and transport behavior while removing that account default.

Type Parameter
TChain extends Chain
ParameterType
clientClient<Transport, TChain>

Client<Transport, TChain, undefined>