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

Missleading revert message #83

Open
clauBv23 opened this issue Nov 7, 2024 · 0 comments
Open

Missleading revert message #83

clauBv23 opened this issue Nov 7, 2024 · 0 comments

Comments

@clauBv23
Copy link

clauBv23 commented Nov 7, 2024

Hi there,
Thanks for such an amazing tool.

I have a simple test that validates upgrade and it was reverting with the message

[FAIL: revert: Failed to run upgrade safety validation: Warning: Potentially unsafe deployment of src/Contracy.sol:Contract

    You are using the `unsafeAllow.delegatecall` flag.

] 

while this shouldn’t be an error at all.

Printing result.stdout value on the _validate function I was able to find the real problem

   ✘  src/Contract.sol:Contract (upgrades from ...)

      src/Contract.sol:880: Upgraded `__gap` to an incompatible type
        - Bad storage gap resize from 50 to 43
          Size decrease must match with corresponding variable inserts
        > Set __gap array to size 44

Not sure how result is being parsed but looks like the information on result.stderr can be misleading, while the one in result.stdout seems to be more accurate.

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

No branches or pull requests

1 participant