Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var web3 = new Web3('wss://mainnet.infura.io/_ws');
- subscription = web3.eth.subscribe('pendingTransactions', function (error, result) {})
- .on("data", function (transactionHash) {
- web3.eth.getTransaction(transactionHash)
- .then(function (transaction) {
- console.log(transaction);
- });
- })
Add Comment
Please, Sign In to add comment