mirror of https://github.com/status-im/web3.js.git
Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
This commit is contained in:
commit
9303d5c576
|
@ -34,14 +34,18 @@
|
|||
// create contract
|
||||
document.getElementById('status').innerText = "transaction sent, waiting for confirmation";
|
||||
web3.eth.contract(abi).new({data: code}, function (err, contract) {
|
||||
if (err) {
|
||||
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';
|
||||
}
|
||||
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;
|
||||
}
|
||||
myContract = contract;
|
||||
console.log('address: ' + myContract.address);
|
||||
|
||||
document.getElementById('status').innerText = 'Mined!';
|
||||
document.getElementById('call').style.visibility = 'visible';
|
||||
// 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,14 +42,17 @@
|
|||
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);
|
||||
document.getElementById('status').innerText = 'Mined!';
|
||||
document.getElementById('call').style.visibility = 'visible';
|
||||
|
||||
inc = contract.Incremented({odd: true}, update);
|
||||
}
|
||||
|
||||
contract = c;
|
||||
console.log('address: ' + contract.address);
|
||||
document.getElementById('status').innerText = 'Mined!';
|
||||
document.getElementById('call').style.visibility = 'visible';
|
||||
|
||||
inc = contract.Incremented({odd: true}, update);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue