-
Notifications
You must be signed in to change notification settings - Fork 12
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
Calling hardhat_setStorageAt
after eth_getStorageAt
doesn't work when forking
#503
Comments
I can't reproduce this. @Rubilmax could you please create and share a minimal reproducible example? |
Sorry, update the description because I mixed up addresses. Here is a reproducible example: https://github.com/Rubilmax/edr-setStorageAt-issue Configure a rpc URL in the environment variable and run |
Quick notes:
|
Thanks a lot @Rubilmax, that's a great repro. Confirmed that this is happening and important. Some more info for ourselves:
|
hardhat_setStorageAt
rejects with "Contract with code hash 0x...
does not exist"hardhat_setStorageAt
after hardhat_setStorageAt
doesn't work when forking
hardhat_setStorageAt
after hardhat_setStorageAt
doesn't work when forkinghardhat_setStorageAt
after hardhat_getStorageAt
doesn't work when forking
hardhat_setStorageAt
after hardhat_getStorageAt
doesn't work when forkinghardhat_setStorageAt
after eth_getStorageAt
doesn't work when forking
Thanks a lot for the hot fix, will do this while a proper fix is published to the EDR |
I discovered the culprit and fixed the bug. Thank you for the detailed reproduction steps! We'll release a new patch version of EDR as soon as possible. |
We've released EDR v0.4.1 with a fix for this issue. To upgrade to the latest EDR version immediately, you can remove your You can verify that you’re using the latest version of EDR by running the following command: |
Minimal reproducible example
Using hardhat 2.22.5 (EDR ^0.4.0), the following code rejects with "Contract with code hash
0xaee43571f51ad4922c41ab126fb98a76934d579c76f54b9e393ade09aad21646
does not exist.":While the following one does not:
In other words, inverting the order of requests
eth_getStorageAt
andhardhat_setStorageAt
changes the behavior of the EDR, while it should not (both should not reject)The text was updated successfully, but these errors were encountered: