estimateL1Gas

How to calculate total Gas?

You can call the L2 RPC byeth_estimateGas method and add L1 Gas returned by estimateL1Gas function.

Total Gas estimated: estimateL1Gas + eth_estimateGas in L2