refactor: move evm-spec-id to config#5786
Merged
mattsse merged 4 commits intofoundry-rs:masterfrom Sep 6, 2023
mattsse:matt/move-evm-spec-to-config
Merged
refactor: move evm-spec-id to config#5786mattsse merged 4 commits intofoundry-rs:masterfrom mattsse:matt/move-evm-spec-to-config
mattsse merged 4 commits intofoundry-rs:masterfrom
mattsse:matt/move-evm-spec-to-config
Conversation
Evalir
approved these changes
Sep 6, 2023
Member
Evalir
left a comment
There was a problem hiding this comment.
makes sense, i like this! we currently reason about the spec id as an evm—related util when it's an important part of the config. just adding a few commits to inline & remove the utility on the evm crate
Evalir
approved these changes
Sep 6, 2023
Member
Evalir
left a comment
There was a problem hiding this comment.
made some changes—feel free to rollback if you prefer to have both!
| } | ||
| } | ||
|
|
||
| /// Converts an `EvmVersion` into a `SpecId`. |
Member
There was a problem hiding this comment.
removed this as this was duped from this pr onwards
|
|
||
| /// Returns the [SpecId] derived from [EvmVersion] | ||
| #[inline] | ||
| pub fn evm_spec_id(evm_version: &EvmVersion) -> SpecId { |
Member
There was a problem hiding this comment.
wrapped this in a simple util function, and we use this on config
Member
Author
|
gg |
mikelodder7
pushed a commit
to LIT-Protocol/foundry
that referenced
this pull request
Sep 12, 2023
* refactor: move evm-spec-id to config * chore: make util general and wrap it on config * chore: remove duped util on evm crate * chore: fix fixtures --------- Co-authored-by: Enrique Ortiz <hi@enriqueortiz.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
prep for #5782
this makes it easier to access the spec id required for the evm from the config
Solution