flashbots / web3-flashbots

Web3.py plugin for using Flashbots' bundle APIs
https://pypi.org/project/flashbots/
MIT License
405 stars 213 forks source link

Continuous Send Bundle Transactions, the simulate goes to failed by "nonce too high" error #83

Closed UselessXiaoYao closed 3 months ago

UselessXiaoYao commented 12 months ago

Hi, When I write some test case, for example, 1st step, swap ETH to UNI, 2nd step approve uniswap router, then the 3rd step swap UNI back to ETH. I always meet "nonce too high" error when I do simulation of the approve transaction, because the 1st step block number is same as the simulate block, and the nonce to the block has not increased yet, but new transaction's nonce has to increase. So, do I have to do a delay to stagger this block? Or this is just a bug?

odysseus0 commented 3 months ago

Would love to help you with the issue on our Discord if you can show the full code there.