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

add mainnet_activation_timestamp for Hardfork #6257

Merged
merged 1 commit into from
Jan 28, 2024

Conversation

tcoratger
Copy link
Contributor

Add mainnet_activation_timestamp method for Hardfork related to the following execution layer spec: https://github.com/ethereum/execution-specs/blob/1fed0c0074f9d6aab3861057e1924411948dc50b/src/ethereum_spec_tools/forks.py#L192

@tcoratger tcoratger requested a review from gakonst as a code owner January 27, 2024 20:52
Copy link
Collaborator

@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.

lgtm

Comment on lines +91 to +96
/// Retrieves the activation timestamp for the specified hardfork on the Ethereum mainnet.
pub fn mainnet_activation_timestamp(&self, chain: Chain) -> Option<u64> {
if chain != Chain::mainnet() {
return None;
}
match self {
Copy link
Collaborator

Choose a reason for hiding this comment

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

lgtm, we could also split these functions into two:

fn activation_timestamp(&self, chain: Chain)

fn mainnet_activation_timestamp(&self)

@mattsse mattsse added this pull request to the merge queue Jan 28, 2024
@mattsse mattsse added the C-enhancement New feature or request label Jan 28, 2024
Merged via the queue into paradigmxyz:main with commit 2d6dbbc Jan 28, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants