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(solc): add support for Paris and Shanghai EVM versions #2385
Conversation
} else if self >= Self::Paris && *version >= PARIS_SOLC { | ||
Self::Paris | ||
} else if self >= Self::London && *version >= LONDON_SOLC { | ||
Self::London | ||
} else if self >= Self::Berlin && *version >= BERLIN_SOLC { | ||
Self::Berlin | ||
} else if self >= Self::Istanbul && *version >= ISTANBUL_SOLC { | ||
Self::Istanbul | ||
} else if self >= Self::Petersburg && *version >= PETERSBURG_SOLC { | ||
Self::Petersburg | ||
} else if self >= Self::Constantinople && *version >= CONSTANTINOPLE_SOLC { | ||
Self::Constantinople | ||
} else if self >= Self::Byzantium { | ||
Self::Byzantium |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swapped the conditions so the faster one is first.
"homestead" => Ok(Self::Homestead), | ||
"tangerineWhistle" => Ok(Self::TangerineWhistle), | ||
"spuriousDragon" => Ok(Self::SpuriousDragon), | ||
"byzantium" => Ok(Self::Byzantium), | ||
"constantinople" => Ok(Self::Constantinople), | ||
"petersburg" => Ok(Self::Petersburg), | ||
"istanbul" => Ok(Self::Istanbul), | ||
"berlin" => Ok(Self::Berlin), | ||
"london" => Ok(Self::London), | ||
"paris" => Ok(Self::Paris), | ||
"shanghai" => Ok(Self::Shanghai), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reordered to match variant order.
e4db70b
to
4c03841
Compare
|
||
pub fn has_push0(&self) -> bool { | ||
*self >= Self::Shanghai | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Motivation
Paris support was added in 0.8.18, and Shanghai support is on track to be released with 0.8.20.
Solution
PR Checklist