1

I tried to generate nonce using this formula, so I can avoid 'underpriced' problem and nonce conflicts

nonce: web3.utils.toHex( Math.round (Date.now() / 1000 - 1586000000)  ),

But simply these transactions are been refused ( I am using Infura rpc)

Why?

Actually it generates number like 365158. Not so great I think...

Shane Fontaine
  • 18,036
  • 20
  • 54
  • 82
realtebo
  • 333
  • 5
  • 15
  • Thanks, but I know how to getTransactionCount for nonce calculation, it was just an idea for cases when sending 2 or more transaction in a minute and so old ones are note mined. Just a curiosity – realtebo Apr 09 '20 at 07:47

1 Answers1

1

The nonces must be processed in order (i.e. 0, 1, 2, ...).

Your formula will not achieve this order and your transactions will be ignored.

Shane Fontaine
  • 18,036
  • 20
  • 54
  • 82