daily pastebin goal
29%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.         $(document).ready(function () {
  3.             const Web3 = require('web3');
  4.             const web3 = new Web3(new Web3.providers.HttpProvider('https://rinkeby.infura.io/<Access_Token>'));
  5.  
  6.             $(".btn-send").click(function () {
  7.                 web3.eth.sendTransaction(
  8.                     {
  9.                         to: '0xae8cE2D0B2015Aeb62189822C7eEae2f60B011e5',
  10.                         from: '0x5ada788989dCa813cBE82eD8bB8d54e1b43327A7',
  11.                         value: web3.toWei("1", "ether")
  12.                     },
  13.                     function (error, transactionHash) {
  14.                         if (!error) {
  15.                             console.log("send successfully");
  16.                         } else {
  17.                             console.log("Error: " + error);
  18.                         }
  19.                     }
  20.                 );
  21.             });
  22.         });
  23. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top