How to debug "Gas estimation failed: 'The execution failed due to an exception.'" in brownie?

211 views Asked by At

Is there any general way to trace where this error occurs? It seems like a pretty common error, but I don't know any way to debug it.

Do I have to always manually and thoroughly review my function and transaction calls both in python and solidity?

Especially when project is more complex and uses external contracts this process can be very tedious and time-consuming.

Thanks for any response

1

There are 1 answers

2
Niccolò Fant On

That messages means that the function reverted somewhere. If you go on etherscan or any other block explorer you can check the emitted events during the transaction so you can see where the flow stops.