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

Support user-defined value types in mappings #844

Merged
merged 3 commits into from
Jul 12, 2023

Conversation

Xanewok
Copy link
Contributor

@Xanewok Xanewok commented Jul 12, 2023

This fixes the upgraded contract storage check failure when using a custom value types in mappings, e.g.

mapping(UserDefinedValueType => ...) mappingThatFails;

See #779 (comment)

I can confirm that this fixes the upgrade for a contract that uses such mapping (I'm using upgradeProxy from hardhat-upgrades).

cc @frangio who suggested the fix

This fixes the upgraded contract storage check failure when using a custom value types in mappings, e.g.
```
mapping(UserDefinedValueType => ...) mappingThatFails;
```

See OpenZeppelin#779 (comment)

I can confirm that this fixes the upgrade for a contract that uses such mapping (I'm using `upgradeProxy` from hardhat-upgrades).
@ericglau ericglau changed the title fix: Treat user-defined value types as such Support user-defined value types in mappings Jul 12, 2023
Copy link
Member

@ericglau ericglau left a comment

Choose a reason for hiding this comment

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

Thanks!

@ericglau ericglau enabled auto-merge (squash) July 12, 2023 19:59
@ericglau ericglau merged commit 57ae094 into OpenZeppelin:master Jul 12, 2023
7 checks passed
@Xanewok Xanewok deleted the patch-1 branch July 12, 2023 20:53
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

Successfully merging this pull request may close these issues.

2 participants