#StackBounty: #go-ethereum geth –dev fails to mine more than one contract

Bounty: 50

I installed geth and solc by following

sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum-unstable
sudo apt-get install solc

then i ran

geth --dev

and did

geth attach

I created a contract and compiled it and “deployed” it to my blockchain.

var abi = <abi from solc>;
var jarContract = eth.contract(abi); 
var bin = '0x' + "<bytecode from solc>";
var txDeploy = {from:eth.accounts[0], data: bin, gas: 1000000}; 
var jar = jarContract.new(txDeploy); 

It was instantly mined and I got an address for it and could work with it.

But then I did

var jar2 = jarContract.new(txDeploy); 

i.e. using EXACTLY the same variables as before, and nothing ever happened. It was not “mined”, I got no address and could not interact with the contract.

I am a bit stumped. I only seem to be able to get one contract out of –dev and then have to stop and start it again to “mine” another one.

Any thoughts would be welcome!

Thanks


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.