Additional work on the JS stuff to make it more similar to Solidity.

This commit is contained in:
Gav Wood
2015-01-25 13:43:36 -08:00
parent 113a3809ab
commit d223ac0379
5 changed files with 40 additions and 4 deletions

View File

@ -268,6 +268,15 @@ var web3 = {
/// eth object prototype
eth: {
contractFromAbi: function (abi) {
return function(addr) {
// Default to address of Config. TODO: rremove prior to genesis.
addr = addr || '0xc6d9d2cd449a754c494264e1809c50e34d64562b';
var ret = web3.eth.contract(addr, abi);
ret.address = addr;
return ret;
};
},
watch: function (params) {
return new web3.filter(params, ethWatch);
}