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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
TChain extends Chain |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
client | Client<Transport, TChain> |
Returns
Section titled “Returns”Client<Transport, TChain, undefined>