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

stronger typing for Networks concept #227

Closed
ralexstokes opened this issue Sep 8, 2023 · 2 comments · Fixed by #230
Closed

stronger typing for Networks concept #227

ralexstokes opened this issue Sep 8, 2023 · 2 comments · Fixed by #230

Comments

@ralexstokes
Copy link
Owner

I started a module to house this here: https://github.com/ralexstokes/ethereum-consensus/blob/main/ethereum-consensus/src/networks.rs

it would be nice to have stronger typing for the networks we support

e.g.

enum Network {
   Mainnet,
   Goerli,
   ...
}

and use this in lieu of the string name in the config (see here: https://github.com/ralexstokes/ethereum-consensus/blob/main/ethereum-consensus/src/state_transition/context.rs#L75 )

we can then also refactor stuff like this: https://github.com/ralexstokes/mev-rs/blob/main/mev-rs/src/network.rs

@chirag-bgh
Copy link
Contributor

I will take this.

@ralexstokes
Copy link
Owner Author

@chirag-bgh great! I am basically thinking to move the stuff from the mev-rs code to the networks module here, and then we will need to execute all the accompanying refactors

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 a pull request may close this issue.

2 participants