This PR changes the order of the middleware stack (nonce management needs to be the outermost layer), and vendors the NonceManagerMiddleware so that some convenience functions can be added like reset_nonce and address(). The code was initially copied from ethers-rs, but I ultimately had to improve the retry logic to get the nonce manager to reliably succeed with large numbers of fuzz runs and fast fuzz runs.
Review Checklists
Please check each item before approving the pull request. While going
through the checklist, it is recommended to leave comments on items that are
referenced in the checklist to make sure that they are reviewed.
[ ] Testing
[ ] Are there new or updated unit or integration tests?
[ ] Do the tests cover the happy paths?
[ ] Do the tests cover the unhappy paths?
[ ] Are there an adequate number of fuzz tests to ensure that we are
covering the full input space?
[ ] If matching Solidity behavior, are there differential fuzz tests that
ensure that Rust matches Solidity?
Resolved Issues
Fixes: #3.
Description
This PR changes the order of the middleware stack (nonce management needs to be the outermost layer), and vendors the
NonceManagerMiddleware
so that some convenience functions can be added likereset_nonce
andaddress()
. The code was initially copied fromethers-rs
, but I ultimately had to improve the retry logic to get the nonce manager to reliably succeed with large numbers of fuzz runs and fast fuzz runs.Review Checklists
Please check each item before approving the pull request. While going through the checklist, it is recommended to leave comments on items that are referenced in the checklist to make sure that they are reviewed.