Interfaces

This document is better viewed on the docs page.

Interfaces to be used by Hooks

  • IHookEvents: Interface for standard hook events emission.

Interfaces

IHookEvents

import "uniswap-hooks/src/interfaces/IHookEvents.sol";

Interface for standard hook events emission.

Hooks should inherit from this interface to standardized event emission.

HookSwap(bytes32 indexed id, address indexed sender, int128 amount0, int128 amount1, uint128 hookLPfeeAmount0, uint128 hookLPfeeAmount1) event

Event emitted when a swap is executed.

HookFee(bytes32 indexed id, address indexed sender, uint128 feeAmount0, uint128 feeAmount1) event

Event emitted when a fee is collected.

HookModifyLiquidity(bytes32 indexed id, address indexed sender, int128 amount0, int128 amount1) event

Event emitted when a liquidity modification is executed.

HookBonus(bytes32 indexed id, uint128 amount0, uint128 amount1) event

Event emitted when a bonus is added to a swap.