Skip to content

Commit

Permalink
feedback: memory hookData
Browse files Browse the repository at this point in the history
  • Loading branch information
saucepoint committed Jun 17, 2024
1 parent 240c8e1 commit 1cb1948
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .forge-snapshots/decreaseLiquidity_erc20.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
187220
187367
2 changes: 1 addition & 1 deletion .forge-snapshots/decreaseLiquidity_erc6909.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
166214
166360
2 changes: 1 addition & 1 deletion .forge-snapshots/increaseLiquidity_erc20.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
187943
188126
2 changes: 1 addition & 1 deletion .forge-snapshots/increaseLiquidity_erc6909.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
163546
163729
2 changes: 1 addition & 1 deletion .forge-snapshots/mintWithLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
485501
485679
6 changes: 3 additions & 3 deletions contracts/base/BaseLiquidityManagement.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ contract BaseLiquidityManagement is SafeCallback {

mapping(address owner => mapping(LiquidityRangeId rangeId => Position)) public positions;

error LockFailure();
error UnlockFailure();

constructor(IPoolManager _poolManager) ImmutableState(_poolManager) {}

function modifyLiquidity(LiquidityRange memory range, int256 liquidityDelta, bytes calldata hookData, bool claims)
function modifyLiquidity(LiquidityRange memory range, int256 liquidityDelta, bytes memory hookData, bool claims)
internal
returns (BalanceDelta delta)
{
Expand All @@ -70,7 +70,7 @@ contract BaseLiquidityManagement is SafeCallback {
function _unlockCallback(bytes calldata data) internal override returns (bytes memory) {
(bool success, bytes memory returnData) = address(this).call(data);
if (success) return returnData;
if (returnData.length == 0) revert LockFailure();
if (returnData.length == 0) revert UnlockFailure();
// if the call failed, bubble up the reason
/// @solidity memory-safe-assembly
assembly {
Expand Down

0 comments on commit 1cb1948

Please sign in to comment.