github.com/status-im/status-go@v1.1.0/contracts/uniswapV3/interfaces/pool/IUniswapV3PoolEvents.sol (about)

     1  // SPDX-License-Identifier: GPL-2.0-or-later
     2  pragma solidity >=0.5.0;
     3  
     4  /// @title Events emitted by a pool
     5  /// @notice Contains all events emitted by the pool
     6  interface IUniswapV3PoolEvents {
     7      /// @notice Emitted exactly once by a pool when #initialize is first called on the pool
     8      /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize
     9      /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96
    10      /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool
    11      event Initialize(uint160 sqrtPriceX96, int24 tick);
    12  
    13      /// @notice Emitted when liquidity is minted for a given position
    14      /// @param sender The address that minted the liquidity
    15      /// @param owner The owner of the position and recipient of any minted liquidity
    16      /// @param tickLower The lower tick of the position
    17      /// @param tickUpper The upper tick of the position
    18      /// @param amount The amount of liquidity minted to the position range
    19      /// @param amount0 How much token0 was required for the minted liquidity
    20      /// @param amount1 How much token1 was required for the minted liquidity
    21      event Mint(
    22          address sender,
    23          address indexed owner,
    24          int24 indexed tickLower,
    25          int24 indexed tickUpper,
    26          uint128 amount,
    27          uint256 amount0,
    28          uint256 amount1
    29      );
    30  
    31      /// @notice Emitted when fees are collected by the owner of a position
    32      /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
    33      /// @param owner The owner of the position for which fees are collected
    34      /// @param tickLower The lower tick of the position
    35      /// @param tickUpper The upper tick of the position
    36      /// @param amount0 The amount of token0 fees collected
    37      /// @param amount1 The amount of token1 fees collected
    38      event Collect(
    39          address indexed owner,
    40          address recipient,
    41          int24 indexed tickLower,
    42          int24 indexed tickUpper,
    43          uint128 amount0,
    44          uint128 amount1
    45      );
    46  
    47      /// @notice Emitted when a position's liquidity is removed
    48      /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
    49      /// @param owner The owner of the position for which liquidity is removed
    50      /// @param tickLower The lower tick of the position
    51      /// @param tickUpper The upper tick of the position
    52      /// @param amount The amount of liquidity to remove
    53      /// @param amount0 The amount of token0 withdrawn
    54      /// @param amount1 The amount of token1 withdrawn
    55      event Burn(
    56          address indexed owner,
    57          int24 indexed tickLower,
    58          int24 indexed tickUpper,
    59          uint128 amount,
    60          uint256 amount0,
    61          uint256 amount1
    62      );
    63  
    64      /// @notice Emitted by the pool for any swaps between token0 and token1
    65      /// @param sender The address that initiated the swap call, and that received the callback
    66      /// @param recipient The address that received the output of the swap
    67      /// @param amount0 The delta of the token0 balance of the pool
    68      /// @param amount1 The delta of the token1 balance of the pool
    69      /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96
    70      /// @param liquidity The liquidity of the pool after the swap
    71      /// @param tick The log base 1.0001 of price of the pool after the swap
    72      event Swap(
    73          address indexed sender,
    74          address indexed recipient,
    75          int256 amount0,
    76          int256 amount1,
    77          uint160 sqrtPriceX96,
    78          uint128 liquidity,
    79          int24 tick
    80      );
    81  
    82      /// @notice Emitted by the pool for any flashes of token0/token1
    83      /// @param sender The address that initiated the swap call, and that received the callback
    84      /// @param recipient The address that received the tokens from flash
    85      /// @param amount0 The amount of token0 that was flashed
    86      /// @param amount1 The amount of token1 that was flashed
    87      /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
    88      /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee
    89      event Flash(
    90          address indexed sender,
    91          address indexed recipient,
    92          uint256 amount0,
    93          uint256 amount1,
    94          uint256 paid0,
    95          uint256 paid1
    96      );
    97  
    98      /// @notice Emitted by the pool for increases to the number of observations that can be stored
    99      /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index
   100      /// just before a mint/swap/burn.
   101      /// @param observationCardinalityNextOld The previous value of the next observation cardinality
   102      /// @param observationCardinalityNextNew The updated value of the next observation cardinality
   103      event IncreaseObservationCardinalityNext(
   104          uint16 observationCardinalityNextOld,
   105          uint16 observationCardinalityNextNew
   106      );
   107  
   108      /// @notice Emitted when the protocol fee is changed by the pool
   109      /// @param feeProtocol0Old The previous value of the token0 protocol fee
   110      /// @param feeProtocol1Old The previous value of the token1 protocol fee
   111      /// @param feeProtocol0New The updated value of the token0 protocol fee
   112      /// @param feeProtocol1New The updated value of the token1 protocol fee
   113      event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);
   114  
   115      /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner
   116      /// @param sender The address that collects the protocol fees
   117      /// @param recipient The address that receives the collected protocol fees
   118      /// @param amount0 The amount of token0 protocol fees that is withdrawn
   119      /// @param amount0 The amount of token1 protocol fees that is withdrawn
   120      event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);
   121  }