Skip to content

Commit

Permalink
Improve code consistency by aligning return value usage
Browse files Browse the repository at this point in the history
  • Loading branch information
zZoMROT committed Feb 3, 2025
1 parent f3f5dee commit db0b021
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions contracts/UniV4Helper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ pragma solidity 0.8.23;
import "@uniswap/v3-core/contracts/libraries/BitMath.sol";

interface IPosManager {
struct PoolKey {
address currency0;
address currency1;
uint24 fee;
int24 tickSpacing;
}
function poolKeys(bytes25 poolId) external view returns(PoolKey memory poolKey);
function poolKeys(bytes25 poolId) external view returns (address currency0, address currency1, uint24 fee, int24 tickSpacing);
}

interface IStateView {
Expand Down Expand Up @@ -53,7 +47,7 @@ contract UniV4Helper {
}

function getTicks(bytes32 poolId, int24 tickRange) external view returns (bytes[] memory ticks) {
int24 tickSpacing = _POS_MANAGER.poolKeys(bytes25(poolId)).tickSpacing;
(,,,int24 tickSpacing) = _POS_MANAGER.poolKeys(bytes25(poolId));
(,int24 tick,,) = _STATE_VIEW.getSlot0(poolId);

tickRange *= tickSpacing;
Expand Down

0 comments on commit db0b021

Please sign in to comment.