Skip to content

Commit

Permalink
simple bubble
Browse files Browse the repository at this point in the history
  • Loading branch information
saucepoint committed Aug 1, 2024
1 parent 58d80e6 commit 80ae166
Show file tree
Hide file tree
Showing 27 changed files with 28 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_burn_empty.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
46761
46759
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_burn_empty_native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
46579
46576
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_burn_nonEmpty.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
129621
129619
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_burn_nonEmpty_native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
122543
122540
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
149718
149715
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
140870
140867
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_sameRange.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
149718
149715
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_decreaseLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
115261
115258
Original file line number Diff line number Diff line change
@@ -1 +1 @@
108171
108168
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_decrease_burnEmpty.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
133487
133484
Original file line number Diff line number Diff line change
@@ -1 +1 @@
126226
126224
Original file line number Diff line number Diff line change
@@ -1 +1 @@
127977
127974
Original file line number Diff line number Diff line change
@@ -1 +1 @@
151197
151194
Original file line number Diff line number Diff line change
@@ -1 +1 @@
132997
132994
Original file line number Diff line number Diff line change
@@ -1 +1 @@
133924
133921
Original file line number Diff line number Diff line change
@@ -1 +1 @@
170080
170077
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
371232
371229
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
335932
335929
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_nativeWithSweep.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
344562
344559
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_onSameTickLower.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
313914
313911
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_onSameTickUpper.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
314556
314553
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_mint_sameRange.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
240138
240135
Original file line number Diff line number Diff line change
@@ -1 +1 @@
369400
369397
Original file line number Diff line number Diff line change
@@ -1 +1 @@
319932
319929
Original file line number Diff line number Diff line change
@@ -1 +1 @@
415608
415605
12 changes: 2 additions & 10 deletions src/base/Multicall.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,10 @@ abstract contract Multicall is IMulticall {
(bool success, bytes memory result) = address(this).delegatecall(data[i]);

if (!success) {
// handle custom errors
if (result.length == 4) {
assembly {
revert(add(result, 0x20), mload(result))
}
}
// Next 5 lines from https://ethereum.stackexchange.com/a/83577
if (result.length < 68) CallFailed.selector.bubbleUpAndRevertWith();
// bubble up the revert reason
assembly {
result := add(result, 0x04)
revert(add(result, 0x20), mload(result))
}
revert(abi.decode(result, (string)));
}

results[i] = result;
Expand Down
6 changes: 1 addition & 5 deletions test/position-managers/PositionManager.multicall.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,7 @@ contract PositionManagerMulticallTest is Test, PosmTestSetup, LiquidityFuzzers {

address charlie = makeAddr("CHARLIE");
vm.startPrank(charlie);
vm.expectRevert(
abi.encodeWithSelector(
IMulticall.CallFailed.selector, abi.encodeWithSelector(IPositionManager.NotApproved.selector, charlie)
)
);
vm.expectRevert(abi.encodeWithSelector(IPositionManager.NotApproved.selector, charlie));
lpm.multicall(calls);
vm.stopPrank();
}
Expand Down

0 comments on commit 80ae166

Please sign in to comment.