Updated ethereum.js

This commit is contained in:
obscuren
2015-01-09 12:45:09 +01:00
parent 585f259b63
commit 012a1c2533
34 changed files with 2924 additions and 951 deletions

View File

@ -0,0 +1,16 @@
#!/usr/bin/env node
require('es6-promise').polyfill();
var web3 = require("../index.js");
web3.setProvider(new web3.providers.HttpRpcProvider('http://localhost:8080'));
web3.eth.coinbase.then(function(result){
console.log(result);
return web3.eth.balanceAt(result);
}).then(function(balance){
console.log(web3.toDecimal(balance));
}).catch(function(err){
console.log(err);
});