EatTheBlocks Forum

"Flashloan" could not deploy due to insufficient funds?

On truffle migrate --reset --network mainnet I get a successful compilation after that:

Note that I commented out the deployment of migration.sol to limit the use of gas, is it integral to deploy it ?

const Migrations = artifacts.require("Migrations");

module.exports = function(deployer) {



As it is shown the address does have sufficient funds but get the insufficient funds message, why is that and from where exactly in the code does it get the “gas * price + value” ?

1 Like

Figured this one out myself too :slight_smile: For anybody having the same issue just add in truffle-config.js under mainnet:
gasPrice:web3.utils.toWei(‘30’, ‘gwei’), // or lower gas price


What was the total cost for you?

I"m having the same issue but I don’t quite get how you fixed the bug? I have plenty of funds in my account. @Batman

You need to change/insert values into truffle-config like @dannyo mentioned