I am looking for a solution to estimate multiple transactions together before submitting any of them. However some of these transaction depend on the other in the sense, if they are not submitted in an order they will fail. I can use nonce to manage the order of submission of them, but the later transactions cannot be properly estimated without the depended transaction being submitted.

My use case is to find out the transaction fees for all the transactions together before even submitting the first transaction.

One solution as mentioned here is to use a fork using tools like ganache or hardhat and then do the estimation by submitting my transactions one by one on the fork and then estimating the dependent transactions. However this is not scalable for many users as I will not be able to create that many forks.

Please help, thanks in advance.

2 Answers 2


I would recommend you check out tenderly.co 's transaction simulator, where you can call desired contract's functions and it gives you all the details about the transaction including gas costs.


Currently state override is supported in ethereum for eth_estimateGas. So if we know the how the state will be updated by the dependent transactions we can use state override to simulate such an environment while estimating the Gas. This example shows for eth_call how to use state overrides. Same thing is now possible with eth_estimateGas for several RPC clients including geth.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.