Skip to content

Commit

Permalink
clear bits
Browse files Browse the repository at this point in the history
  • Loading branch information
dianakocsis committed Oct 21, 2024
1 parent 6593e70 commit 3f89a32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .forge-snapshots/poolManager bytecode size.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
23946
24002
6 changes: 3 additions & 3 deletions src/libraries/CustomRevert.sol
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ library CustomRevert {

// Encode wrapped error selector, address, function selector, offset, additional context, size, revert reason
mstore(fmp, wrappedErrorSelector)
mstore(add(fmp, 0x04), revertingContract)
mstore(add(fmp, 0x24), revertingFunctionSelector)
mstore(add(fmp, 0x04), and(revertingContract, 0xffffffffffffffffffffffffffffffffffffffff))
mstore(add(fmp, 0x24), and(revertingFunctionSelector, 0xffffffff00000000000000000000000000000000000000000000000000000000))
// offset revert reason
mstore(add(fmp, 0x44), 0x80)
// offset additional context
Expand All @@ -107,7 +107,7 @@ library CustomRevert {
// size additional context
mstore(add(fmp, add(0xa4, encodedDataSize)), 0x04)
// additional context
mstore(add(fmp, add(0xc4, encodedDataSize)), additionalContext)
mstore(add(fmp, add(0xc4, encodedDataSize)), and(additionalContext, 0xffffffff00000000000000000000000000000000000000000000000000000000))
revert(fmp, add(0xe4, encodedDataSize))
}
}
Expand Down

0 comments on commit 3f89a32

Please sign in to comment.