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

feat: add extra_fields to ChainConfig #631

Merged
merged 7 commits into from
Apr 25, 2024

Conversation

fgimenez
Copy link
Contributor

Motivation

Towards paradigmxyz/reth#7702

Currently fields specific to chains different from mainnet Ethereum (like those related to OP forks) are not being deserialized into ChainConfig.

Solution

Adds an extra_fields field to ChainConfig to gather the additional chain-specific information without polluting the top-level object.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

pedantic nit about re-exports

crates/genesis/src/lib.rs Outdated Show resolved Hide resolved
crates/serde/src/lib.rs Outdated Show resolved Hide resolved
@onbjerg onbjerg requested a review from mattsse April 25, 2024 13:04
@fgimenez
Copy link
Contributor Author

pedantic nit about re-exports

makes sense, done

@mattsse mattsse merged commit 4e22b9e into alloy-rs:main Apr 25, 2024
18 checks passed
@fgimenez fgimenez deleted the fgimenez/add-chainconfig-extra-fields branch April 25, 2024 13:10
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* feat: add extra_fields to ChainConfig

* add test

* String from alloc

* add serde_json to deps

* use serde_json::Value instead of reexporting from serde crate

Co-authored-by: Matthias Seitz <[email protected]>

* remove extra line

* remove json_value import

---------

Co-authored-by: Matthias Seitz <[email protected]>
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