feat: Support returning values from the callback

Rollback some of the Ekubo's Executor changes to a previous version to use the generic callback logic using transient storage

Took 1 hour 25 minutes


Took 13 seconds
This commit is contained in:
Diana Carvalho
2025-04-09 18:15:26 +01:00
parent f91b101a94
commit fb35a5305a
4 changed files with 100 additions and 46 deletions

View File

@@ -85,7 +85,10 @@ contract Dispatcher {
}
// slither-disable-next-line assembly
function _handleCallback(bytes calldata data) internal {
function _handleCallback(bytes calldata data)
internal
returns (bytes memory)
{
address executor;
assembly {
executor := tload(0)
@@ -114,5 +117,9 @@ contract Dispatcher {
assembly {
tstore(0, 0)
}
// this is necessary because the delegatecall will prepend extra bytes we don't want like the length and prefix
bytes memory decodedResult = abi.decode(result, (bytes));
return decodedResult;
}
}