[Ethereum] Deploying Migrations using network ‘rinkeby’ – insufficient funds for gas * price + value

go-ethereumrinkebytruffle-migration

I'm connected to the "Rinkeby" network on MetaMask. I've imported the private key into Geth. Thereby, I unlocked the account using geth --rpc --networkid 4 --unlock <account_address>. Thereafter, I'm trying to deploy my smart contract using truffle. I'm using the following command to deploy the migrations: truffle migrate --reset --network rinkeby --compile-all. But I receive the following error –

Error: insufficient funds for gas * price + value

Inside truffle.js, I've configured to connect to Rinkeby as follows –

 host: "localhost", 
 port: 8545,
 from: "<account_address>",
 network_id: "4",
 gas: 4000000, 
 gasPrice: 20000000000

I have 3 ETH in my account from the Rinkeby Authenticated Faucet.

Where exactly am I going wrong?

Best Answer

You would set your gas to 6712390 at truffle configuration. Hope it helps.

Related Topic