-
Notifications
You must be signed in to change notification settings - Fork 773
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
Chain & HF enum usage #1363
Chain & HF enum usage #1363
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
This looks good. I spotted 3 places where the |
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.
This looks great though I'm a little concerned about the namespace collision between the new Chain
enum in @ethereumjs/common
and then the Chain
class exported by @ethereumjs/client
. It's easy enough to hack around by just aliasing one of them as here but I wonder if it wouldn't be better to rename the enum to something like ChainName
or something? I'm not how often sure users would be instantiating a new Common
instance with the client since we don't have a client package actually live on NPM yet or if client even exports chain
but I could see this tripping people up down the line. Thoughts?
thanks for contributing to the PR! good point about the namespace collision, but you also make a good point that not many people will likely be developing in the client and be instantiating commons so I don't think it requires renaming the whole enum. I think having the simpler enum name of |
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.
thanks @emersonmacro, this looks great! 🎉
@ryanio thanks for updating and merging 🎉 @acolytec3 thanks for taking a look as well, and definitely valid points. i kept |
Second stage of work for #702. Updates usage of
common
package throughout monorepo to use newChain
andHardfork
enums.My methodology was to use the global search term
new Common
and go package by package, so it's possible I may have missed some spots, but I tried to be as comprehensive as possible.