diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 9847444ee..cc26540f6 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -28,6 +28,7 @@ jobs: package: - core - plugin-hardhat + fail-fast: false runs-on: ubuntu-latest diff --git a/packages/core/contracts/test/NamespacedToModify.sol b/packages/core/contracts/test/NamespacedToModify.sol index 91863fc3b..c8c1d0e75 100644 --- a/packages/core/contracts/test/NamespacedToModify.sol +++ b/packages/core/contracts/test/NamespacedToModify.sol @@ -8,6 +8,12 @@ contract Example { uint256 y; } + /// @custom:storage-location erc7201:example.secondary + struct SecondaryStorage { + uint256 a; + uint256 b; + } + /// @notice some natspec function foo() public {} diff --git a/packages/core/src/utils/make-namespaced.test.ts b/packages/core/src/utils/make-namespaced.test.ts index da02b8418..6dbbe56ae 100644 --- a/packages/core/src/utils/make-namespaced.test.ts +++ b/packages/core/src/utils/make-namespaced.test.ts @@ -49,7 +49,9 @@ async function testMakeNamespaced( function normalizeStateVariableNames(input: SolcInput): void { for (const source of Object.values(input.sources)) { if (source.content !== undefined) { - source.content = source.content.replace(/\$MainStorage_\d{1,6};/g, '$MainStorage_random;'); + source.content = source.content + .replace(/\$MainStorage_\d{1,6};/g, '$MainStorage_random;') + .replace(/\$SecondaryStorage_\d{1,6}/g, '$SecondaryStorage_random'); } } } diff --git a/packages/core/src/utils/make-namespaced.test.ts.md b/packages/core/src/utils/make-namespaced.test.ts.md index bdcf08b29..83a23e9aa 100644 --- a/packages/core/src/utils/make-namespaced.test.ts.md +++ b/packages/core/src/utils/make-namespaced.test.ts.md @@ -37,6 +37,12 @@ Generated by [AVA](https://avajs.dev). uint256 x;␊ uint256 y;␊ } MainStorage $MainStorage_random;␊ + ␊ + /// @custom:storage-location erc7201:example.secondary␊ + struct SecondaryStorage {␊ + uint256 a;␊ + uint256 b;␊ + } SecondaryStorage $SecondaryStorage_random;␊ ␊ ␊ ␊ diff --git a/packages/core/src/utils/make-namespaced.test.ts.snap b/packages/core/src/utils/make-namespaced.test.ts.snap index 760ce4135..de4bc1ff7 100644 Binary files a/packages/core/src/utils/make-namespaced.test.ts.snap and b/packages/core/src/utils/make-namespaced.test.ts.snap differ