openzeppelin-upgrades
openzeppelin-upgrades copied to clipboard
Namespaced layout validations: extract detailed types in interfaces
Related to https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/1086#issuecomment-2380705809
If contracts inherit interfaces that have structs annotated with namespaces, those namespaces can still be validated but they won't have detailed type information such as slots or lengths.
When creating modified solc input, consider converting interfaces into abstract contracts, so that we can insert variables for the namespace structs to extract their detailed type information.
This would require:
- Change
interfacetoabstract contract - Add
virtualto any interface functions since they are unimplemented - Continue making other modifications similar to how contracts are treated, so that other function signature changes would also occur (to ensure the virtual function's signature does not become out of sync from any implementations)
However, this risks further compilation errors since there may be other edge cases. We should only consider this after https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/1088.