-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
priority: mediumIssues or pull requests with medium priorityIssues or pull requests with medium prioritystatus: todoIssues that need to be addressedIssues that need to be addressedtype: bugIssues or pull request related to bug reports or malfunctionsIssues or pull request related to bug reports or malfunctions
Milestone
Description
While trying to compile using the OpenZeppelin openzeppelin-foundry-upgrades plugin alongside MC, the following error is encountered:
[FAIL. Reason: setup failed: revert: Failed to run upgrade safety validation: /Users/user/.npm/_npx/fb3494f8bab08a4d/node_modules/@openzeppelin/upgrades-core/dist/validate/run.js:169
throw new error_1.UpgradesError(`${decodeSrc(node)}: Namespace struct ${node.name} is defined outside of a contract`, () => `Structs with the @custom:storage-location annotation must be defined within a contract. Move the struct definition into a contract, or remove the annotation if the struct is not used for namespaced storage.`);
^
UpgradesError: lib/mc/devkit/Flattened.sol:24695: Namespace struct ConfigState is defined outside of a contract
Structs with the @custom:storage-location annotation must be defined within a contract. Move the struct definition into a contract, or remove the annotation if the struct is not used for namespaced storage.
at checkNamespacesOutsideContract (/Users/user/.npm/_npx/fb3494f8bab08a4d/node_modules/@openzeppelin/upgrades-core/dist/validate/run.js:169:23)
at validate (/Users/user/.npm/_npx/fb3494f8bab08a4d/node_modules/@openzeppelin/upgrades-core/dist/validate/run.js:90:9)
at runValidations (/Users/user/.npm/_npx/fb3494f8bab08a4d/node_modules/@openzeppelin/upgrades-core/dist/cli/validate/validations.js:23:41)
at validateBuildInfoContracts (/Users/user/.npm/_npx/fb3494f8bab08a4d/node_modules/@openzeppelin/upgrades-core/dist/cli/validate/validations.js:14:29)
at validateUpgradeSafety (/Users/user/.npm/_npx/fb3494f8bab08a4d/node_modules/@openzeppelin/upgrades-core/dist/cli/validate/validate-upgrade-safety.js:23:74)
at async main (/Users/user/.npm/_npx/fb3494f8bab08a4d/node_modules/@openzeppelin/upgrades-core/dist/cli/validate.js:30:24)
at async run (/Users/user/.npm/_npx/fb3494f8bab08a4d/node_modules/@openzeppelin/upgrades-core/dist/cli/cli.js:6:5)
Metadata
Metadata
Assignees
Labels
priority: mediumIssues or pull requests with medium priorityIssues or pull requests with medium prioritystatus: todoIssues that need to be addressedIssues that need to be addressedtype: bugIssues or pull request related to bug reports or malfunctionsIssues or pull request related to bug reports or malfunctions