You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the error report we keep the struct/contract keywords. Yet, in the retyped annotations we expect the type without those keywords. A user might copy the type from the error and put it in the retype annotation and it would not work (see also #727).
See struct V2.ProposalCore below:
Error: New storage layout is incompatible
contracts/Test.sol:36: Upgraded `_proposals` to an incompatible type
- In mapping(uint256 => struct V2.ProposalCore)
- Bad upgrade from struct V1.ProposalCore to struct V2.ProposalCore
I believe we should also remove the keywords from the error messages, as a result the types will look more like Solidity to the user and they will also be copy-pastable into the retyped annotation.
As a side note, the function should probably be renamed:
In the error report we keep the
struct
/contract
keywords. Yet, in the retyped annotations we expect the type without those keywords. A user might copy the type from the error and put it in the retype annotation and it would not work (see also #727).See
struct V2.ProposalCore
below:I believe we should also remove the keywords from the error messages, as a result the types will look more like Solidity to the user and they will also be copy-pastable into the retyped annotation.
As a side note, the function should probably be renamed:
openzeppelin-upgrades/packages/core/src/storage/compare.ts
Lines 411 to 415 in 1bca9c3
The text was updated successfully, but these errors were encountered: