Here are my files on github, https://github.com/ArtieLadie/gas_limit
https://github.com/ArtieLadie/gas_limit/blob/master/deploy.js sets gas limit here,
async function deployContract(web3, contract, sender) {
let Voter = new web3.eth.Contract(contract.abi);
let bytecode = '0x' + contract.evm.bytecode.object;
let gasEstimate = await web3.eth.estimateGas({data: bytecode});
This is the account I am using to deploy contract. It has 18 ether.
https://rinkeby.etherscan.io/address/0xf8f07fc5301d4644ab33f59496a03363233b8f79
When I deploy contract, I get error,
Failed to deploy contract: Error: Returned error: insufficient funds for gas * price + value
I tried starting geth with
sudo geth attach /home/solidity/.ethereum/rinkeby/geth.ipc — targetgaslimit 2000000
but still no luck :-(
If it helps ....
1st Terminal
2nd Terminal
3rd Terminal
let gasEstimate = await web3.eth.estimateGas({data: bytecode}) + 100000;
, no luck :-( – Marium Nov 25 '19 at 0:41await Voter.deploy({ data: bytecode }) .estimateGas()
– Ismael Nov 25 '19 at 4:00