SwapCallbacks
Inherits: UniV4Callbacks, UniV3Callbacks, UniV2Callbacks, DodoV2Callbacks, BalancerV3Callbacks
Title: Swap Callback executor
Author: 1delta Labs AG
Functions
_deltaComposeInternal
Internal function to execute compose operations
Override point for swap callbacks to execute compose operations
function _deltaComposeInternal(
address callerAddress,
uint256 offset,
uint256 length
)
internal
virtual
override(
UniV4Callbacks,
V3Callbacker,
UniV2Callbacks,
DodoV2Callbacks,
BalancerV3Callbacks //
);
Parameters
| Name | Type | Description |
|---|---|---|
callerAddress |
address |
Address of the original caller |
offset |
uint256 |
Current calldata offset |
length |
uint256 |
Length of remaining calldata |
fallback
Fallback function that handles swap callbacks
Swap callbacks are taken in the fallback. We do this to have an easier time in validating similar callbacks with separate selectors. We identify the selector in the fallback and then map it to the DEX. Note that each "_execute..." function returns (exits) when a callback is run. If it falls through all variations, it reverts at the end.
fallback() external;