IBonsaiswapV3PoolEvents
Contains all events emitted by the pool
Events
Initialize
Emitted exactly once by a pool when #initialize is first called on the pool
Mint/Burn/Swap cannot be emitted by the pool before Initialize
Parameters:
Name | Type | Description |
---|---|---|
| uint160 | The initial sqrt price of the pool, as a Q64.96 |
| int24 | The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool |
Mint
Emitted when liquidity is minted for a given position
Parameters:
Name | Type | Description |
---|---|---|
| address | The address that minted the liquidity |
| address | The owner of the position and recipient of any minted liquidity |
| int24 | The lower tick of the position |
| int24 | The upper tick of the position |
| uint128 | The amount of liquidity minted to the position range |
| uint256 | How much token0 was required for the minted liquidity |
| uint256 | How much token1 was required for the minted liquidity |
Collect
Emitted when fees are collected by the owner of a position
Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
Parameters:
Name | Type | Description |
---|---|---|
| address | The owner of the position for which fees are collected |
| int24 | The lower tick of the position |
| int24 | The upper tick of the position |
| uint128 | The amount of token0 fees collected |
| uint128 | The amount of token1 fees collected |
Burn
Emitted when a position's liquidity is removed
Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
Parameters:
Name | Type | Description |
---|---|---|
| address | The owner of the position for which liquidity is removed |
| int24 | The lower tick of the position |
| int24 | The upper tick of the position |
| uint128 | The amount of liquidity to remove |
| uint256 | The amount of token0 withdrawn |
| uint256 | The amount of token1 withdrawn |
Swap
Emitted by the pool for any swaps between token0 and token1
Parameters:
Name | Type | Description |
---|---|---|
| address | The address that initiated the swap call, and that received the callback |
| address | The address that received the output of the swap |
| int256 | The delta of the token0 balance of the pool |
| int256 | The delta of the token1 balance of the pool |
| uint160 | The sqrt(price) of the pool after the swap, as a Q64.96 |
| uint128 | The liquidity of the pool after the swap |
| int24 | The log base 1.0001 of price of the pool after the swap |
Flash
Emitted by the pool for any flashes of token0/token1
Parameters:
Name | Type | Description |
---|---|---|
| address | The address that initiated the swap call, and that received the callback |
| address | The address that received the tokens from flash |
| uint256 | The amount of token0 that was flashed |
| uint256 | The amount of token1 that was flashed |
| uint256 | The amount of token0 paid for the flash, which can exceed the amount0 plus the fee |
| uint256 | The amount of token1 paid for the flash, which can exceed the amount1 plus the fee |
IncreaseObservationCardinalityNext
Emitted by the pool for increases to the number of observations that can be stored
observationCardinalityNext is not the observation cardinality until an observation is written at the index just before a mint/swap/burn.
Parameters:
Name | Type | Description |
---|---|---|
| uint16 | The previous value of the next observation cardinality |
| uint16 | The updated value of the next observation cardinality |
SetFeeProtocol
Emitted when the protocol fee is changed by the pool
Parameters:
Name | Type | Description |
---|---|---|
| uint8 | The previous value of the token0 protocol fee |
| uint8 | The previous value of the token1 protocol fee |
| uint8 | The updated value of the token0 protocol fee |
| uint8 | The updated value of the token1 protocol fee |
CollectProtocol
Emitted when the collected protocol fees are withdrawn by the factory owner
Parameters:
Name | Type | Description |
---|---|---|
| address | The address that collects the protocol fees |
| address | The address that receives the collected protocol fees |
| uint128 | The amount of token0 protocol fees that is withdrawn |
| uint128 | The amount of token1 protocol fees that is withdrawn |
Last updated