Skip to content

Commit bc8cfa0

Browse files
fix: STAA-13 remediation commit i
1 parent 950d364 commit bc8cfa0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core/ERC7779Adapter.sol

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ abstract contract ERC7779Adapter is IERC7779 {
4343
assembly {
4444
$.slot := ERC7779_STORAGE_BASE
4545
}
46+
// Check if the storageBase already exists to avoid duplication
47+
for (uint256 i = 0; i < $.storageBases.length; i++) {
48+
if ($.storageBases[i] == storageBase) {
49+
return; // Exit if the storageBase is already present
50+
}
51+
}
4652
$.storageBases.push(storageBase);
4753
}
4854

0 commit comments

Comments
 (0)