-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: nonce filling layer #276
Conversation
73253dc
to
3ea7992
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
smol derive nit, lgtm otherwise
/// ``` | ||
/// | ||
/// [`SignerLayer`]: crate::layers::SignerLayer | ||
pub struct ManagedNonceLayer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- debug + clone etc
@onbjerg could it be that the For context see: https://github.com/alloy-rs/examples/pull/20/files |
It should provided the function you use to deploy uses |
I've opened an issue on Alloy to explore this with a minimal reproduction example: #406 + https://github.com/zerosnacks/alloy-repro-406 |
Motivation
This is a replacement for
NonceManagerMiddleware
in ethersSolution
A layer that fills nonces for transaction requests. It does not require you to specify a sender address like in ethers, instead we use a dashmap internally.
I would like some ideas on how to test that this works with sending transaction requests for the same sender from multiple threads at the same time (i.e. a sanity check on the atomics)
Closes #275
PR Checklist