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(solc): add support for Paris and Shanghai EVM versions #2385

Merged
merged 3 commits into from Apr 29, 2023

Conversation

DaniPopes
Copy link
Collaborator

@DaniPopes DaniPopes commented Apr 29, 2023

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

  • Added Tests
  • Added Documentation
  • Breaking changes

Comment on lines +769 to +782
} 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
Copy link
Collaborator Author

@DaniPopes DaniPopes Apr 29, 2023

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.

Comment on lines +862 to +872
"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),
Copy link
Collaborator Author

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.


pub fn has_push0(&self) -> bool {
*self >= Self::Shanghai
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@gakonst gakonst merged commit 2392253 into gakonst:master Apr 29, 2023
14 of 15 checks passed
@DaniPopes DaniPopes deleted the feat/paris-shanghai branch April 30, 2023 00:06
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.

None yet

2 participants