Flash loan failed to execute - please tell me how to fix

Plankton5165

Regular Member
Joined
Jul 23, 2019
Messages
211
Reaction score
16
Hello.

I am trying to execute flash loans via the tutorial of this video:

And I am trying to deploy a SimpleFlashLoan. But every time I try to deploy the flash loan, it says the gas estimation failed and the error is “jsonrpc”:”2.0”:”error”:”execution reverted” and every time I press confirm on MetaMask, it says the transaction failed.

I’ve been trying to do this on Polygon to try to pay low gas fees for flash loans. I also do have the necessary amount of crypto to cover the gas fees.
 
Your gas fees has to be above the required amount for it to go through.

Try that out
 
How do you pay more than the required amount?

If you mean raising the gas limit, I’ve already tried changing it to 9M, it didn’t work.
 
Flash loans require sufficient funds in the contract to execute the desired operations and pay back the borrowed amount with interest.
Have you added enough funds in the contract?
 
I have enough funds to try to pay the gas fees, and I’ve put the PoolAddressProvider address (Polygon Mumbai) by the deploy button. When I press that button, it says gas estimation failed.
 
Back
Top