ISeawaterEvents
Events
MintPosition
emitted when a new position is minted
event MintPosition(uint256 indexed id, address indexed owner, address indexed pool, int32 lower, int32 upper);
Parameters
Name | Type | Description |
---|---|---|
id | uint256 | the position id |
owner | address | the owner of the position |
pool | address | the pool the position is associated with |
lower | int32 | the lower tick of the position's concentrated liquidity range |
upper | int32 | the upper tick of the position's concentrated liquidity range |
BurnPosition
emitted when a position is burned
event BurnPosition(uint256 indexed id, address indexed owner);
Parameters
Name | Type | Description |
---|---|---|
id | uint256 | the id of the position being burned |
owner | address | the user the owned the position |
TransferPosition
emitted when a position changes owners
event TransferPosition(address indexed from, address indexed to, uint256 indexed id);
Parameters
Name | Type | Description |
---|---|---|
from | address | the original owner of the position |
to | address | the new owner of the position |
id | uint256 | the id of the position being transferred |
UpdatePositionLiquidity
emitted when the liquidity in a position is changed.
event UpdatePositionLiquidity(uint256 indexed id, int256 token0, int256 token1);
Parameters
Name | Type | Description |
---|---|---|
id | uint256 | |
token0 | int256 | |
token1 | int256 | that was taken or given to the contract. |
CollectFees
emitted when a liquidity provider collects the fees associated with a position
event CollectFees(uint256 indexed id, address indexed pool, address indexed to, uint128 amount0, uint128 amount1);
Parameters
Name | Type | Description |
---|---|---|
id | uint256 | the id of the position whose liquidity is being collected |
pool | address | the address of the pool the position is associated with |
to | address | the recipient of the fees |
amount0 | uint128 | the amount of token0 being collected |
amount1 | uint128 | the amount of token1 being collected |
NewPool
emitted when a new pool is created
event NewPool(address indexed token, uint32 indexed fee, uint8 decimals, uint8 tickSpacing);
Parameters
Name | Type | Description |
---|---|---|
token | address | the token0 the pool is associated with (where token1 is a fluid token) |
fee | uint32 | the fee being used for this pool |
decimals | uint8 | the decimals for the token |
tickSpacing | uint8 | the tick spacing for the pool |
CollectProtocolFees
emitted when a protocol admin collects protocol fees
event CollectProtocolFees(address indexed pool, address indexed to, uint128 amount0, uint128 amount1);
Parameters
Name | Type | Description |
---|---|---|
pool | address | the pool for which protocol fees are being collected |
to | address | the account the fees are being sent to |
amount0 | uint128 | the amount of token0 being collected |
amount1 | uint128 | the amount of token1 being collected |
Swap2
emitted when a user swaps a nonfluid token for a nonfluid token (2-step swap)
event Swap2(
address indexed user,
address indexed from,
address indexed to,
uint256 amountIn,
uint256 amountOut,
uint256 fluidVolume,
int32 finalTick0,
int32 finalTick1
);
Parameters
Name | Type | Description |
---|---|---|
user | address | the user performing the swap |
from | address | the input token |
to | address | the output token |
amountIn | uint256 | the amount of from the user is paying |
amountOut | uint256 | the amount of to the user is receiving |
fluidVolume | uint256 | the volume of the internal transfer |
finalTick0 | int32 | the tick that the first token's pool ended on |
finalTick1 | int32 | the tick that the second token's pool ended on |
Swap1
emitted when a user swaps a token for the pool's fluid token, or vice-versa
event Swap1(
address indexed user, address indexed pool, bool zeroForOne, uint256 amount0, uint256 amount1, int32 finalTick
);
Parameters
Name | Type | Description |
---|---|---|
user | address | the user performing the swap |
pool | address | the token being swapped for the fluid token |
zeroForOne | bool | true if the user is swapping token->fluid, false otherwise |
amount0 | uint256 | the amount of the nonfluid token being transferred |
amount1 | uint256 | the amount of the fluid token being transferred |
finalTick | int32 | the tick the pool ended on |
NewFees
new fees were set!
event NewFees(address indexed pool, uint8 indexed feeProtocol);
Parameters
Name | Type | Description |
---|---|---|
pool | address | that the fees are set for. |
feeProtocol | uint8 | that's taken by the protocol |