Utilities
This document is better viewed on the docs page. |
Libraries and general purpose utilities to help develop hooks.
-
CurrencySettler
: Library used to interact with thePoolManager
to settle any open deltas, with support for ERC-6909 and native currencies.
Libraries
CurrencySettler
import "uniswap-hooks/src/utils/CurrencySettler.sol";
Library used to interact with the PoolManager
to settle any open deltas.
To settle a positive delta (a credit to the user), a user may take or mint.
To settle a negative delta (a debt on the user), a user may transfer or burn to pay off a debt.
Based on the Uniswap v4 test utils implementation.
Deltas are synced before any ERC-20 transfers in settle function.
|
Functions