updated ethereum.js

This commit is contained in:
obscuren
2015-01-09 13:01:21 +01:00
parent aee82d3196
commit 18d8bf4b9c
25 changed files with 2938 additions and 0 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);
});