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

Reuse op-alloy genesis params extract support #11046

Closed
Tracked by #12576
mattsse opened this issue Sep 19, 2024 · 0 comments
Closed
Tracked by #12576

Reuse op-alloy genesis params extract support #11046

mattsse opened this issue Sep 19, 2024 · 0 comments
Assignees
Labels
C-debt Refactor of code section that is hard to understand or maintain C-enhancement New feature or request

Comments

@mattsse
Copy link
Collaborator

mattsse commented Sep 19, 2024

Describe the feature

we now have OptimismChainInfo in op-alloy

https://github.com/alloy-rs/op-alloy/blob/8dd56a6b93d400f57966220507beeacacda8fb59/crates/rpc-types/src/genesis.rs#L7-L14

and we still have this helper type here:

/// Genesis info for Optimism.
#[cfg(feature = "optimism")]
#[derive(Default, Debug, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
struct OptimismGenesisInfo {
optimism_chain_info: op_alloy_rpc_types::genesis::OptimismChainInfo,
#[serde(skip)]
base_fee_params: BaseFeeParamsKind,
}

which also does extract:

fn extract_from(genesis: &Genesis) -> Self {

this type is more or less useless:

struct OptimismGenesisInfo {

and only does the BaseFeeParamsKind extraction, I feel like this can be made a bit nicer

@klkvr could be something to take on once we extracted OpChainSpec

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Sep 19, 2024
@mattsse mattsse added C-debt Refactor of code section that is hard to understand or maintain and removed S-needs-triage This issue needs to be labelled labels Sep 19, 2024
@klkvr klkvr closed this as completed Oct 16, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-debt Refactor of code section that is hard to understand or maintain C-enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

2 participants