fixed contract.new examples
This commit is contained in:
parent
f649befa6d
commit
ce52fcf080
|
@ -37,11 +37,15 @@
|
|||
if(err) {
|
||||
console.error(err);
|
||||
return;
|
||||
}
|
||||
|
||||
// callback fires twice, we only want the second call when the contract is deployed
|
||||
} else if(contract.address){
|
||||
|
||||
myContract = contract;
|
||||
console.log('address: ' + myContract.address);
|
||||
document.getElementById('status').innerText = 'Mined!';
|
||||
document.getElementById('call').style.visibility = 'visible';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -37,12 +37,16 @@
|
|||
if (err) {
|
||||
console.error(err);
|
||||
return;
|
||||
}
|
||||
|
||||
// callback fires twice, we only want the second call when the contract is deployed
|
||||
} else if(contract.address){
|
||||
|
||||
myContract = contract;
|
||||
console.log('address: ' + myContract.address);
|
||||
|
||||
document.getElementById('status').innerText = 'Mined!';
|
||||
document.getElementById('call').style.visibility = 'visible';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,9 @@
|
|||
if (err) {
|
||||
console.error(err);
|
||||
return;
|
||||
}
|
||||
|
||||
// callback fires twice, we only want the second call when the contract is deployed
|
||||
} else if(contract.address){
|
||||
|
||||
contract = c;
|
||||
console.log('address: ' + contract.address);
|
||||
|
@ -50,6 +52,7 @@
|
|||
document.getElementById('call').style.visibility = 'visible';
|
||||
|
||||
inc = contract.Incremented({odd: true}, update);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue