Send more than one raw transaction quickly will throw an error
up vote
1
down vote
favorite
web3.eth.getTransactionCount(addressFrom).then(function(v){ count = v; var amount = web3.utils.toHex(1e16); var rawTransaction = {"from":addressFrom, "gasPrice":web3.utils.toHex(20* 1e9),"gasLimit":web3.utils.toHex(210000),"to":contractAddress,"value":"0x0","data":contract.methods.transfer(addressTo, amount).encodeABI(),"nonce":web3.utils.toHex(count)} var transaction = new Tx(rawTransaction); transaction.sign(privKey); web3.eth.sendSignedTransaction('0x'+transaction.serialize().toString('hex')) .on('transactionHash',console.log); }); If I send more than one raw transaction quickly, I get the known transaction error. I got "UnhandledPromiseRejectionWarni...