EatTheBlocks Forum

Unable to deploy Flashloan contract due to mining timeout

I have been unable to get the Flashloan contract deployed. Initially it would say that I had insufficient funds (which I did not), I overcame that by customizing the gas and gasPrice properties in the truffle-config.js file
image

After adding those values, it attempted to deploy, but timed out after 750 seconds. Checking the transaction via Etherscan.io, showed the pending transaction.

I have so far deployed one, and waited 8 hours, after which time the transaction died. Now I have another one that has been going for about ~11 hours.

Any suggestions for how to deploy the contract? Do I need to spend a lot more money?

Yes this has happened to me as well. When deploying your contracts you must check the current prices of gas. As well for you to have the “luxury” of having your block mined within the time from that truffle allows(750sec) needs the fast amount of gas prices. With the current ethereum environment ( price of ethereum and price of gas ) being expensive you can end up payin alot to deploy. I suggest you wait for Julien to upgrade flashloan course for Binance Smart Chain. So an explanation of what happened with your deployed contracts : so with my guess is migration contract deployed but failed on flashloan contract( failed = timeout) So when truffle errors out and stops listening for the contract address and hash to be returned after block mined it also fails to write the very important information into your flashloan.json file which holds the abi to your contract.