-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
"invalid opcode" when reading chain id from inline assembly #952
Comments
Thanks, @PaulRBerg! I think this is a bug in how we initialize it in the plugin. Will address it soon. |
Great, thanks for confirming, @alcuadrado. |
This is indeed an issue in The fix seems simple: add |
This is a recurrent question I have. It's unclear if bumping the hardhfork of the network should actually be a breaking change, given that the users normally think of the default value as being "latest mainnet HF". |
Yeah, I agree. And even if it is a breaking change, it would break things only in extremely edge cases. I don't think it makes sense to be overly rigid with that. |
Expected Behavior
The chain id should be accessible via inline assembly, as this is a feature available since solidity 0.5.12.
Current Behavior
The function that attempts to read the chain id fails with the following error:
Steps to Reproduce
yarn run typechain
yarn run test
and get the same error as aboveContext
As explained in this comment, this issue occurs only when the
@nomiclabs/buidler-ganache
is activated. When the tests are run against an instance ofganache-cli
running in parallel, there is no "invalid opcode" error.I haven't checked whether this has been solved with Hardhat.
Your Environment
The text was updated successfully, but these errors were encountered: