Skip to content

Commit

Permalink
added the intialize hook called after pool intialized in uv4
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi8960git committed Sep 15, 2024
1 parent 83033c7 commit cc3d1d3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/TakeProfitHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ contract TakeProfitsHook is BaseHook, ERC1155 {
return intervals * tickSpacing;
}

// Hooks

// Hooks
function afterInitialize(
address,
PoolKey calldata key,
uint160,
int24 tick,
// Add bytes calldata after tick
bytes calldata
) external override returns (bytes4) {
_setTickLowerLast(key.toId(), _getTickLower(tick, key.tickSpacing));
return TakeProfitsHook.afterInitialize.selector;
}
}

0 comments on commit cc3d1d3

Please sign in to comment.