-
Notifications
You must be signed in to change notification settings - Fork 12
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
Remove usage of batch calls #401
Conversation
🦋 Changeset detectedLatest commit: d3cee7e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
.into_iter() | ||
.map(|transaction_hash| RequestMethod::GetTransactionReceipt(*transaction_hash)) | ||
.collect(); | ||
.map(|transaction_hash| self.get_transaction_receipt(transaction_hash)); |
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.
Doesn't clippy complain about this?
Can't it be map(RpcClient::get_transaction_receipt)
?
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.
My understanding is: get_transaction_receipt
is a method, so it can't be called as RpcClient::get_transaction_receipt
. And apparently Rust doesn't support methods in those scenarios, so you can't do .map(self.get_transaction_receipt)
.
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.
I see now. The problem is that it receives two arguments: self
and B256
.
If it were just the one argument, the pattern would be like in this example: https://github.com/NomicFoundation/edr/blob/main/crates/edr_eth/src/remote/client.rs#L986
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.
Sorry, I updated my response. I overlooked the two arguments and noticed that when I tried it locally
No description provided.