Solidity contract seemed to be mined but contract address still says undefined...What is address?

seberinoseberino Member Posts: 7
I entered this on geth console


var source = "contract mortal { /* Define variable owner of the type address*/ address owner; /*
this function is executed at initialization and sets the owner of the contract */ function mortal() { o
wner = msg.sender; } /* Function to recover the funds on the contract */ function kill() { if (msg.send
er == owner) suicide(owner); } } contract greeter is mortal { /* define variable greeting of the type strin
g */ string greeting; /* this runs when the contract is executed */ function greeter(string _greeti
ng) public { greeting = _greeting; } /* main function */ function greet() constant returns
(string) { return greeting; } }";

var compiled = web3.eth.compile.solidity(source);

var contract_ = web3.eth.contract(;

var contract ="This is a param!",
{from: web3.eth.accounts[0],
data: compiled.greeter.code,
gas: 300000},
function(e, contract) {
if(!e) {
if(!contract.address) {
} else {

I can see contract apparently got mined here:

My contract still has an undefined address...why?

Also, how find address of contract if you forget it or geth console won't reveal it for that contract?




Sign In or Register to comment.