-
Notifications
You must be signed in to change notification settings - Fork 756
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
Common: Add isPrecompiled method #727
Comments
This should have been exposed in this PR. It is trivial, I'll add it. |
Actually it is not trivial where we should expose this function. Should we expose this on top of the VM? This only has things like I think it is good to think about this, as we might get demand for some more of these utility-like functions. We need to know where to place those. |
Ah - attention! 😄 - this is an issue associated to the So this would be a utility function in Not sure if it's worth to be added right now tbh, would be nice to have but also some significant effort to integrate. |
Oops - I didn't see that this was actually the Common package. We have a slight problem here as currently the hardforks are hard-coded (hah!) in I currently don't know how we should do this in a clean way. We could maybe create a map in common where we loop over each fork, latest first, and either return a precompile (I guess this should be an enum so we can support different precompiles at the same address if this happens at some point (?)) or we return that no precompile exists at this address? And then build the trivial |
I am not sure if this is possible in Common anymore, since we now have custom precompiles, which Common is not aware of? |
I will close this issue for now since it is open for 2+ years and was in discussion respectively not completely clear if wanted/needed from the beginning. Fell free to re-open if the need (re-)arises. |
The
isPrecompiled
method is currently being removed from theethereumjs-util
library, since the library has no notion of a "hardfork" and the method is therefore pretty error-prone.Instead
isPrecompiled
might be a better fit in theCommon
class and give out the respective answers depending on the HF set on the common instance.Not sure if this is needed or if there is a strong demand, just drop this here for some eventual discussion and/or remembrance.
The text was updated successfully, but these errors were encountered: