Hi guys,
I am trying to update a contract that contains a struct that has a property that has been renamed. This renaming was not superficial because it represents a critical business logic that needs to say something about what it does.
I am using the natspec doc /// @custom:oz-renamed-from <previous name>
to tell the storage verifier about the change in this way:
struct Project {
uint256 id;
uint256 maintenancePercentage;
uint256 initialProjectValue;
uint256 currentProjectValue;
uint256 swapFactor;
uint256 pWattsSupply;
uint256 usdDepreciated;
uint256 originatorFee;
ProjectState state;
Signatures signatures;
address addr;
address adminAddr;
address installerAddr;
/// @custom:oz-renamed-from operator
address originator;
address stableAddr;
}
But the following error still throws.
Error: New storage layout is incompatible
contracts/ProjectsManager.sol:40: Upgraded `projects` to an incompatible type
- In mapping(address => struct Project)
- Bad upgrade to struct Project
- In struct Project
- Renamed `operator` to `originator`
Did you know how can I solve this without use the unsafeAllowRenames
directive?