Insufficient funds for gas * price + value

Hi all,

I’m using openzeppelin@1.10.0 and trying to deploy a crowdsale smart contract with the token via truffle@4.1.15 and infura. I’m getting the error message insufficient funds for gas * price + value.

I wanted to know if it’s really because I don’t have enough funds in that wallet (I have around 15$ in that wallet). because when I call truffle migrate only a few cents are spent. I was wondering if that’s really the problem. I thought I would have 0$ as it would have tried to spend it all.

Many thanks,

Deploying smart contracts tends to be more expensive and it’s possible that $15 is not enough.

Hello @frangio thanks for your answer, I’ve been checking that current prices would make the deployment to cost up to 1000-1500$. I would like to know why I haven’t run out of funds. Is there a check first before starting to spend gas to check if the wallet has enough gas?

Thank you

Libraries check if a transaction is going to fail before sending it.

Hey, does your MetaMask wallet show 0 funds, if you proceed one step, but not yet confirm the transaction within MetaMask?

For me, there’s a bug, where it will display the same message you received, even though I have enough funds. It happens e.g. when attempting to deploy onto Kovan or BSC Testnet, when the contract is for BSC. Very strange things are going on there.