Skip to content

Commit

Permalink
fix: [spearbit-51][quantstamp-14] clean up upper bits of address in P…
Browse files Browse the repository at this point in the history
…luginStorageLib (#35)
  • Loading branch information
fangting-alchemy authored and jaypaik committed Jan 25, 2024
1 parent 3557eeb commit 8926754
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libraries/PluginStorageLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ library PluginStorageLib {
mstore(0x40, add(add(key, totalSize), 32))
mstore(key, totalSize)

// Clear any dirty upper bits of address
addr := and(addr, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
// Store the address and batch index in the key buffer
mstore(add(key, 32), addr)
mstore(add(key, 64), batchIndex)
Expand Down

0 comments on commit 8926754

Please sign in to comment.