Helpful?
DeltaReturningHook
Git Source | Generated with forge doc
Inherits: BaseTestHooks
State Variables
manager
IPoolManager immutable manager;
deltaSpecified
int128 deltaSpecified;
deltaUnspecifiedBeforeSwap
int128 deltaUnspecifiedBeforeSwap;
deltaUnspecifiedAfterSwap
int128 deltaUnspecifiedAfterSwap;
Functions
constructor
constructor(IPoolManager _manager);
onlyPoolManager
modifier onlyPoolManager();
setDeltaSpecified
function setDeltaSpecified(int128 delta) external;
setDeltaUnspecifiedBeforeSwap
function setDeltaUnspecifiedBeforeSwap(int128 delta) external;
setDeltaUnspecifiedAfterSwap
function setDeltaUnspecifiedAfterSwap(int128 delta) external;
beforeSwap
function beforeSwap(address, PoolKey calldata key, IPoolManager.SwapParams calldata params, bytes calldata)
external
override
onlyPoolManager
returns (bytes4, BeforeSwapDelta, uint24);
afterSwap
function afterSwap(address, PoolKey calldata key, IPoolManager.SwapParams calldata params, BalanceDelta, bytes calldata)
external
override
onlyPoolManager
returns (bytes4, int128);
_sortCurrencies
function _sortCurrencies(PoolKey calldata key, IPoolManager.SwapParams calldata params)
internal
pure
returns (Currency specified, Currency unspecified);
_settleOrTake
function _settleOrTake(Currency currency, int128 delta) internal;