MorphoFlashLoanCallback
Inherits: Masks, DeltaErrors
Title: All Morpho Blue flash callbacks
State Variables
MORPHO_BLUE
Constant MorphoB address
address private constant MORPHO_BLUE = 0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb
Functions
onMorphoFlashLoan
Morpho blue callbacks
Handles Morpho Blue flash loan callback
function onMorphoFlashLoan(uint256, bytes calldata) external;
onMorphoSupply
Handles Morpho Blue supply callback
function onMorphoSupply(uint256, bytes calldata) external;
onMorphoRepay
Handles Morpho Blue repay callback
function onMorphoRepay(uint256, bytes calldata) external;
onMorphoSupplyCollateral
Handles Morpho Blue supply collateral callback
function onMorphoSupplyCollateral(uint256, bytes calldata) external;
_onMorphoCallback
Internal callback handler for all Morpho Blue operations
Morpho Blue is immutable and their flash loans are callbacks to msg.sender. Since it is universal batching and the same validation for all Morpho callbacks, we can use the same logic everywhere
Note: calldata-offset-table:
| Offset | Length (bytes) | Description |
|---|---|---|
| 0 | 20 | origCaller |
| 20 | 1 | poolId |
| 21 | Variable | composeOperations |
function _onMorphoCallback() internal;
_deltaComposeInternal
Internal function to execute compose operations
Override point for flash loan callbacks to execute compose operations
function _deltaComposeInternal(address callerAddress, uint256 offset, uint256 length) internal virtual;
Parameters
| Name | Type | Description |
|---|---|---|
callerAddress |
address |
Address of the original caller |
offset |
uint256 |
Current calldata offset |
length |
uint256 |
Length of remaining calldata |