diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-27 16:36:39 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-27 16:36:39 +0800 |
commit | 1f5a6f13419415b4c05519e126eedcdf815aff7c (patch) | |
tree | de2d9551d3746ab3e4c8c38501ae0a1b6eac09d5 /example | |
parent | d223ac0379c4c1f8c209e777ec9ed63384590157 (diff) | |
parent | da4c2d530d6f9b8ba54221c6812f77766a33fed6 (diff) | |
download | go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.tar go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.tar.gz go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.tar.bz2 go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.tar.lz go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.tar.xz go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.tar.zst go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.zip |
Merge branch 'develop' into cpp
Conflicts:
dist/ethereum.js.map
dist/ethereum.min.js
Diffstat (limited to 'example')
-rw-r--r-- | example/balance.html | 1 | ||||
-rw-r--r-- | example/contract.html | 1 | ||||
-rw-r--r-- | example/node-app.js | 18 |
3 files changed, 7 insertions, 13 deletions
diff --git a/example/balance.html b/example/balance.html index 60b8bbe87..88f55315a 100644 --- a/example/balance.html +++ b/example/balance.html @@ -2,7 +2,6 @@ <html> <head> -<script type="text/javascript" src="js/es6-promise/promise.min.js"></script> <script type="text/javascript" src="js/bignumber.js/bignumber.min.js"></script> <script type="text/javascript" src="../dist/ethereum.js"></script> <script type="text/javascript"> diff --git a/example/contract.html b/example/contract.html index f3dd7d3af..da2282c86 100644 --- a/example/contract.html +++ b/example/contract.html @@ -2,7 +2,6 @@ <html> <head> -<script type="text/javascript" src="js/es6-promise/promise.min.js"></script> <script type="text/javascript" src="js/bignumber.js/bignumber.min.js"></script> <script type="text/javascript" src="../dist/ethereum.js"></script> <script type="text/javascript"> diff --git a/example/node-app.js b/example/node-app.js index f63fa9115..8c2fc0ba3 100644 --- a/example/node-app.js +++ b/example/node-app.js @@ -1,16 +1,12 @@ #!/usr/bin/env node -require('es6-promise').polyfill(); - var web3 = require("../index.js"); -web3.setProvider(new web3.providers.HttpRpcProvider('http://localhost:8080')); +web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8080')); + +var coinbase = web3.eth.coinbase; +console.log(coinbase); + +var balance = web3.eth.balanceAt(coinbase); +console.log(balance); -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); -});
\ No newline at end of file |