Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var acct = eth.accounts[0];
- //Проверяем баланс
- var acctBal = web3.fromWei(eth.getBalance(acct), "ether");
- //Разблокируем аккант и отправляем ETH
- if(personal.unlockAccount(eth.accounts[0], "notmyrealpassword", 300)) {
- web3.eth.sendTransaction({from:eth.accounts[0],
- to:'0x4019Eb7A7Cca9eE9875EDe23C9Acb17a335Bce73',
- value: "1.5"})
- .then(function(receipt, error) {
- console.log("" + error);
- });
- } else {
- console.log("cannot unlock account");
- }
- /*
- INFO [07-22|23:54:21.132] Submitted transaction fullhash=0xb2
- 44a19263250b8e88be9775e8427e126f7c8ad5c6fec328fa7c346d081d0ac6 recipient=0x35D22
- e8820F62175447c87b99a02F48c81979b76
- */
Add Comment
Please, Sign In to add comment