@@ -54,11 +54,14 @@ export class EVMProofHelper {
5454
5555 /**
5656 * @dev Fetches a set of proofs for the requested state slots.
57- * @param blockNo A `ProvableBlock`'s number returned by `getProvableBlock`.
58- * @param address The address of the contract to fetch data from.
59- * @param slots An array of slots to fetch data for.
60- * @returns A proof of the given slots, encoded in a manner that this service's
61- * corresponding decoding library will understand.
57+ *
58+ * Since `FallbackProvider` does not support sending custom RPC requests directly,
59+ * we manually iterate over its underlying providers (which are `JsonRpcProvider` instances).
60+ *
61+ * @param blockNo The block number from which to retrieve the state proof.
62+ * @param address The contract address for which the proof is requested.
63+ * @param slots An array of storage slots to fetch proofs for.
64+ * @returns A `StateProof` object containing the proof data for the given slots.
6265 */
6366 async getProofs (
6467 blockNo : number ,
@@ -73,13 +76,12 @@ export class EVMProofHelper {
7376
7477 logInfo ( 'Calling linea_getProof with args' , args ) ;
7578
76- // We have to reinitialize the provider L2 because of an issue when multiple
77- // requests are sent at the same time, the provider becomes unaware of
78- // the linea_getProof method
79-
79+ // `FallbackProvider` does not allow direct custom RPC calls.
80+ // Instead, we iterate over its configured providers and send the request manually.
8081 const providerConfigs = this . providerL2 . providerConfigs ;
8182
8283 for ( const config of providerConfigs ) {
84+ // Extract the underlying provider, which is a `JsonRpcProvider`
8385 // @ts -expect-error - We know this is a JsonRpcProvider
8486 const provider : JsonRpcProvider = config . provider ;
8587
0 commit comments