Skip to content

Commit

Permalink
🐞 Fix AddressSet (#1123)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vectorized authored Oct 13, 2024
1 parent 99ebce5 commit d0fcabb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/utils/g/EnumerableSetLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,14 @@ library EnumerableSetLib {
let p := keccak256(0x00, 0x40)
if iszero(sload(p)) {
n := shr(1, n)
sstore(add(rootSlot, n), shl(96, value))
result := 1
sstore(p, add(1, n))
if iszero(n) {
sstore(rootSlot, or(3, shl(96, value)))
break
}
sstore(add(rootSlot, n), shl(96, value))
sstore(rootSlot, add(2, rootPacked))
result := 1
break
}
break
Expand Down

0 comments on commit d0fcabb

Please sign in to comment.