I am new to geth command line for testnet in Windows. I got an error when trying to deploy this contract example
----------------------------------------------
source = "contract test { function multiply(uint a) returns(uint d) { return a * 7;} } ";
contract = eth.compile.solidity(source).test;
txhash = eth.sendTransaction({from: primary, data: contract.code});
eth.getBlock("pending", true).transactions;
miner.start(1); admin.sleepBlocks(1); miner.stop();
contractaddress = eth.getTransactionReceipt(txhash).contractAddress;
eth.getCode(contractaddress);
multiply7 = eth.contract(contract.info.abiDefinition).at(contractaddress);
fortytwo = multiply7.multiply.call(6);
I read similar questions, but did not help! most of the answers telling ignoring 'undefined' during compiling the code (the second command). But when i tried the third command i got this error
TypeError: Cannot access member 'code' of undefined at :1:52
Is there any solution?
Thanks
function
keyword, and there's an extra;
at the end. Can you confirm that this is the exact code you're trying to compile?