Skip to content

Commit

Permalink
Merge branch 'main' into actions-clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
snreynolds authored Dec 2, 2024
2 parents 3e4afbe + 05ede29 commit 9029b31
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_native.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
148593
148571
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_sameRange.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
157242
157220
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_withClose.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
157242
157220
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_withTakePair.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
156478
156456
Original file line number Diff line number Diff line change
@@ -1 +1 @@
114183
114165
Original file line number Diff line number Diff line change
@@ -1 +1 @@
122577
122555
Original file line number Diff line number Diff line change
@@ -1 +1 @@
121813
121791
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_decrease_burnEmpty.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
138195
138177
Original file line number Diff line number Diff line change
@@ -1 +1 @@
131276
131258
Original file line number Diff line number Diff line change
@@ -1 +1 @@
135240
135218
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_decrease_take_take.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
123191
123169
Original file line number Diff line number Diff line change
@@ -1 +1 @@
162441
162419
Original file line number Diff line number Diff line change
@@ -1 +1 @@
161305
161283
Original file line number Diff line number Diff line change
@@ -1 +1 @@
145318
145296
Original file line number Diff line number Diff line change
@@ -1 +1 @@
138032
138010
Original file line number Diff line number Diff line change
@@ -1 +1 @@
180216
180194
Original file line number Diff line number Diff line change
@@ -1 +1 @@
150804
150782
2 changes: 1 addition & 1 deletion .forge-snapshots/positionDescriptor bytecode size.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24177
24110
2 changes: 1 addition & 1 deletion .forge-snapshots/positionManager bytecode size.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19068
19060
2 changes: 0 additions & 2 deletions src/PositionDescriptor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ contract PositionDescriptor is IPositionDescriptor {
return CurrencyRatioSortOrder.DENOMINATOR_MORE;
} else if (currency == WBTC) {
return CurrencyRatioSortOrder.DENOMINATOR_MOST;
} else {
return 0;
}
}
return 0;
Expand Down
9 changes: 5 additions & 4 deletions src/libraries/CalldataDecoder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,8 @@ library CalldataDecoder {
pure
returns (uint256 tokenId, uint256 liquidity, uint128 amount0, uint128 amount1, bytes calldata hookData)
{
// no length check performed, as there is a length check in `toBytes`
assembly ("memory-safe") {
if lt(params.length, 0x80) {
mstore(0, SLICE_ERROR_SELECTOR)
revert(0x1c, 4)
}
tokenId := calldataload(params.offset)
liquidity := calldataload(add(params.offset, 0x20))
amount0 := calldataload(add(params.offset, 0x40))
Expand All @@ -96,6 +93,7 @@ library CalldataDecoder {
pure
returns (uint256 tokenId, uint128 amount0Max, uint128 amount1Max, bytes calldata hookData)
{
// no length check performed, as there is a length check in `toBytes`
assembly ("memory-safe") {
tokenId := calldataload(params.offset)
amount0Max := calldataload(add(params.offset, 0x20))
Expand All @@ -120,6 +118,7 @@ library CalldataDecoder {
bytes calldata hookData
)
{
// no length check performed, as there is a length check in `toBytes`
assembly ("memory-safe") {
poolKey := params.offset
tickLower := calldataload(add(params.offset, 0xa0))
Expand All @@ -146,6 +145,7 @@ library CalldataDecoder {
bytes calldata hookData
)
{
// no length check performed, as there is a length check in `toBytes`
assembly ("memory-safe") {
poolKey := params.offset
tickLower := calldataload(add(params.offset, 0xa0))
Expand All @@ -164,6 +164,7 @@ library CalldataDecoder {
pure
returns (uint256 tokenId, uint128 amount0Min, uint128 amount1Min, bytes calldata hookData)
{
// no length check performed, as there is a length check in `toBytes`
assembly ("memory-safe") {
tokenId := calldataload(params.offset)
amount0Min := calldataload(add(params.offset, 0x20))
Expand Down

0 comments on commit 9029b31

Please sign in to comment.