I have used geth to setup a local private blockchain. I have been able to setup two accounts and send ether from one to the other and mine the transactions. Now I am trying to deploy a smart contract. I followed this steps:
Used solcjs to generate the .abi and .bin files
Start the miner
Unlocked the account used to deploy the contract
Saved in the geth console the bin and abi with:
var contract = web3.eth.contract(<CONTENTS_OF_ABI_FILE>)
var bytecode = '0x<CONTENTS_OF_BIN_FILE>'
Deploy the smart contract with:
var deploy = {from:eth.accounts[0], data:bytecode, gas: 2000000}
var instance = contract.new(param1,param2,param3, deploy)
Then geth returns undefined and if I execute `instance.address' I still get undefined.
Why is my contract not getting mined?