3
votes

Trying to follow the greeter tutorial and while I've sidestepped some problem (couldn't get solC installed locally), this one has got me stuck.

I've compiled the solidity online here https://ethereum.github.io/browser-solidity/#version=soljson-latest.js

The result is two different sections on the right, one for 'greeter' and one for 'mortal'.

I start up the geth console locally and unlock my account with "personal.unlockAccount". After pasting in the text from the "Web3 deploy" sections of the greeter contract, I get the response null [object Object] from the geth console and the console freezes up and does not present another prompt. This is the paste :

var _greeting = "yellow";
var greeterContract = web3.eth.contract([{"constant":false,"inputs":[],"name":"kill","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"greet","outputs":[{"name":"","type":"string"}],"type":"function"},{"inputs":[{"name":"_greeting","type":"string"}],"type":"constructor"}]);
var greeter = greeterContract.new(
_greeting,
{
 from: web3.eth.accounts[0], 
 data: '606060405260405161023e38038061023e8339810160405280510160008054600160a060020a031916331790558060016000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10609f57805160ff19168380011785555b50608e9291505b8082111560cc57600081558301607d565b50505061016e806100d06000396000f35b828001600101855582156076579182015b82811115607657825182600050559160200191906001019060b0565b509056606060405260e060020a600035046341c0e1b58114610026578063cfae321714610068575b005b6100246000543373ffffffffffffffffffffffffffffffffffffffff908116911614156101375760005473ffffffffffffffffffffffffffffffffffffffff16ff5b6100c9600060609081526001805460a06020601f6002600019610100868816150201909416939093049283018190040281016040526080828152929190828280156101645780601f1061013957610100808354040283529160200191610164565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156101295780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b565b820191906000526020600020905b81548152906001019060200180831161014757829003601f168201915b505050505090509056', 
gas: 3000000
}, function(e, contract){
console.log(e, contract);
if (typeof contract.address != 'undefined') {
     console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);
}
})

Anybody got a clue, because I sure don't

1

1 Answers

2
votes

null[object Object] must not make any problem i guess.

start mining ,miner.start(), and wait for the contract mined address throwback, getting address depends on the CPU speed. so wait for it.

Try starting with easier example than greeter check this link ,may be useful

http://billmarino2.github.io/general/2015/12/09/JURIX-2015-setting-up-an-ethereum-testnet.html