-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Detecting changes to the AppStorage structure would be great as a way of guarding against diamond corruption.
See https://eip2535diamonds.substack.com/p/example-of-a-diamond-upgrade for more info.
Specifically:
- All new storage members must be appended to the existing App storage struct.
Gemforge can optionally support checking for adherence to these rules. The proposal:
- New
diamond.storageconfig key which points to:
{
type: "AppStorage",
config: {
file: "PathToFileContainingAppStorageStruct.sol"
struct: "NameOfAppStorageStruct"
}
}- Gemforge will complain if existing items are changed (even by name)
- Gemforge will complain if the struct/file cannot be found.
- All checks will be done during the
build, when GemForge parses the code.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request