Guest User

Untitled

a guest
May 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. var Web3 = require('web3');
  2.  
  3. window.addEventListener('load', function() {
  4.  
  5. window.web3 = new Web3(web3.currentProvider)
  6.  
  7. var ETH_CLIENT = window.web3
  8. web3.eth.getAccounts(function(error, accounts) {
  9. if (error) {
  10. console.log(error);
  11. }
  12.  
  13.  
  14. console.log('account0 ='+accounts[0]);
  15.  
  16. console.log('account1 = '+accounts[1]);
  17. });
  18. })
Add Comment
Please, Sign In to add comment