Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

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
@DaniPopes DaniPopes deleted the feat/paris-shanghai branch April 30, 2023 00:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants