https://drive.google.com/open?id=18Q06i5nb3zPZufolBizKpaLuNGp-XjH4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Web3 = require('web3'); | |
const EthereumTx = require('ethereumjs-tx'); | |
const ethUtil = require('ethereumjs-util'); | |
const rlp = require('rlp'); | |
var txDecoder = require('ethereum-tx-decoder'); | |
let flag = false; | |
let buffer; | |
const API_KEY = 'https://ropsten.infura.io/v3/YOUR_INFURA_KEY'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
web3.eth.accounts.signTransaction({ | |
to: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55', | |
value: '1000000000', | |
gas: 2000000, | |
gasPrice: '234567897654321', | |
nonce: 0, | |
chainId: 1 | |
}, '0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318') | |
.then(console.log); |
With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.
This document is a comparison of various ways the <script>
tags in HTML are processed depending on the attributes set.
If you ever wondered when to use inline <script async type="module">
and when <script nomodule defer src="...">
, you're in the good place!
Note that this article is about <script>
s inserted in the HTML; the behavior of <script>
s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)