diff --git a/.forge-snapshots/poolManager bytecode size.snap b/.forge-snapshots/poolManager bytecode size.snap index 86d2a9e0e..92bce6075 100644 --- a/.forge-snapshots/poolManager bytecode size.snap +++ b/.forge-snapshots/poolManager bytecode size.snap @@ -1 +1 @@ -23946 \ No newline at end of file +24002 \ No newline at end of file diff --git a/src/libraries/CustomRevert.sol b/src/libraries/CustomRevert.sol index 4283260ce..60d65af09 100644 --- a/src/libraries/CustomRevert.sol +++ b/src/libraries/CustomRevert.sol @@ -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 @@ -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)) } }