Skip to content

feat(l1): drop unwraps from rpc crate #3075

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

feat(l1): drop unwraps from rpc crate #3075

wants to merge 10 commits into from

Conversation

cdiielsi
Copy link
Contributor

@cdiielsi cdiielsi commented Jun 6, 2025

Motivation

Dissallow unwraps on l1.

Description

This pr drops unwraps on crate rpc in networking. Test's unwraps remain. Resolves partially #2879

Copy link

github-actions bot commented Jun 6, 2025

Lines of code report

Total lines added: 21
Total lines removed: 2
Total lines changed: 23

Detailed view
+-------------------------------------------------------+-------+------+
| File                                                  | Lines | Diff |
+-------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/initializers.rs                     | 337   | -2   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/clients/beacon/errors.rs | 13    | +2   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/clients/beacon/mod.rs    | 73    | +2   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/l2/transaction.rs        | 223   | +4   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/rpc.rs                   | 586   | +12  |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/utils.rs                 | 384   | +1   |
+-------------------------------------------------------+-------+------+

@cdiielsi cdiielsi marked this pull request as ready for review June 9, 2025 16:21
@cdiielsi cdiielsi requested a review from a team as a code owner June 9, 2025 16:21
let response =
self.client
.get(self.url.clone().join(endpoint).map_err(|_| {
BeaconClientError::Custom("Failed to set url endpoint".to_string())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be add a new error type ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Contributor

@SDartayet SDartayet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants