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

Create a DEFAULT_COMMON in Common #1128

Closed
jochem-brouwer opened this issue Feb 26, 2021 · 3 comments
Closed

Create a DEFAULT_COMMON in Common #1128

jochem-brouwer opened this issue Feb 26, 2021 · 3 comments

Comments

@jochem-brouwer
Copy link
Member

In #1048 we discussed the possibility to export a DEFAULT_COMMON from Common. We use default commons across the packages, so for me it would make sense that we put this default on a centralized point (i.e. in Common).

@holgerd77
Copy link
Member

My first-thought suggestion here would be to add an additional DEFAULT_CHAIN parameter (likely set to mainnet?) and then add a static constructor method Common.getDefaultCommon() using DEFAULT_CHAIN and DEFAULT_HARDFORK for instance creation.

@jochem-brouwer
Copy link
Member Author

Yep, this makes sense!

@holgerd77
Copy link
Member

I've made some search here for new Common({ chain: 'mainnet' }) and see where this applies and also looked into some code parts directly, and there are actually really few places where such a pattern is used in its plain form (so with no additional parameters for whatever reason).

Also this issue hasn't been addressed for some months so there seems to be not such an urgent need.

I will therefore cautiously close, feel free to reopen everyone who sees the need for this functionality (also no very strong opinion here, we can just add and that's it, think this would make some send and would eventually have some benefits).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants