Skip to content
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

reexport relevant crates from op-reth #11493

Closed
0xForerunner opened this issue Oct 4, 2024 · 5 comments · Fixed by #11499
Closed

reexport relevant crates from op-reth #11493

0xForerunner opened this issue Oct 4, 2024 · 5 comments · Fixed by #11499
Labels
A-op-reth Related to Optimism and op-reth C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@0xForerunner
Copy link
Contributor

0xForerunner commented Oct 4, 2024

Describe the feature

The reth crate reexports all/most of it's dependencies from a lib.rs. For users building on op-reth the same could be useful.

I'd be happy to submit a PR if it would be welcome!

@0xForerunner 0xForerunner added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Oct 4, 2024
@mattsse
Copy link
Collaborator

mattsse commented Oct 4, 2024

reasonable

@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started A-op-reth Related to Optimism and op-reth and removed S-needs-triage This issue needs to be labelled labels Oct 4, 2024
@mattsse
Copy link
Collaborator

mattsse commented Oct 4, 2024

do you want to take this?

@0xForerunner
Copy link
Contributor Author

Yep, I'm on it! Thanks!

@0xForerunner
Copy link
Contributor Author

0xForerunner commented Oct 4, 2024

@mattsse Do you think it's wise to have

pub use reth::*;

in lib.rs?

Essentially this would mean the op-reth reexports everything that reth does and would essentially be a superset. It's nice because it means less duplication of all the reexport code. Then for the optimism crates you can just prefix them like this:

pub mod optimism_payload {
    pub use reth_optimism_payload_builder::*;
}

It also means you get non-optimism specific code reexported from op-reth.

@0xForerunner
Copy link
Contributor Author

Additionally, how do you feel about reexporting all of the alloy/op-alloy types from reth/op-reth respectively?

users could use like this:

use reth::alloy::rpc_types::*;
use op_reth::op_alloy::rpc_types::*;

This would be pretty nice as it would prevent consumers from having to respecify all their alloy dependencies in their tomls (and having to match versions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants