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

Workaround for getStorageAt() bug in Hardhat 2.9.5 for gnosis external test #13020

Merged

Conversation

cameel
Copy link
Member

@cameel cameel commented May 13, 2022

Gnosis external test started failing due to and extra sanity check introduced by Hardhat 2.9.5:

Besides that, now the eth_getStorageAt method is spec-compliant. This means that the storage slot argument must have a length of 32 bytes (a hex-encoded, 0x-prefixed string of length 66).

This makes gnosis job fail in some PRs. E.g. 1059920:

 1) Migration
       migrate
         can migrate:
     InvalidArgumentsError: Errors encountered in param 1: Storage slot argument must have a length of 66 ("0x" + 32 bytes), but '0x6' has a length of 3

I have submitted an upstream fix (safe-global/safe-smart-account#404) but unfortunately Hardhat has a bug and does not really accept properly padded storage address either (NomicFoundation/hardhat#2709).

For now the simplest workaround is to stay at 2.9.4.

@cameel cameel self-assigned this May 13, 2022
ekpyron
ekpyron previously approved these changes May 13, 2022
Copy link
Member

@ekpyron ekpyron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a rebase, if we want the archlinux test to pass. But we should see whether it fixes the gnosis run either way. If it does, we can merge.

@cameel
Copy link
Member Author

cameel commented May 13, 2022

Gnosis test passed so I'll rebase.

@cameel cameel force-pushed the gnosis-ext-test-get-storage-at-hardhat-bug-workaround branch from 41b83e4 to 3bfb79d Compare May 13, 2022 17:05
@ekpyron ekpyron enabled auto-merge May 13, 2022 17:35
@ekpyron ekpyron merged commit a3bd01d into develop May 13, 2022
@ekpyron ekpyron deleted the gnosis-ext-test-get-storage-at-hardhat-bug-workaround branch May 13, 2022 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants