Guest User

Untitled

a guest
Jul 23rd, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. var acct = eth.accounts[0];
  2. //Проверяем баланс
  3. var acctBal = web3.fromWei(eth.getBalance(acct), "ether");
  4.  
  5. //Разблокируем аккант и отправляем ETH
  6. if(personal.unlockAccount(eth.accounts[0], "notmyrealpassword", 300)) {
  7. web3.eth.sendTransaction({from:eth.accounts[0],
  8. to:'0x4019Eb7A7Cca9eE9875EDe23C9Acb17a335Bce73',
  9. value: "1.5"})
  10. .then(function(receipt, error) {
  11. console.log("" + error);
  12. });
  13. } else {
  14. console.log("cannot unlock account");
  15. }
  16.  
  17. /*
  18. INFO [07-22|23:54:21.132] Submitted transaction fullhash=0xb2
  19. 44a19263250b8e88be9775e8427e126f7c8ad5c6fec328fa7c346d081d0ac6 recipient=0x35D22
  20. e8820F62175447c87b99a02F48c81979b76
  21. */
Add Comment
Please, Sign In to add comment