refactor: rm callback verifier dispatcher

This commit is contained in:
royvardhan
2025-02-14 23:11:01 +05:30
parent 260f9d866f
commit d0027e6cf2
11 changed files with 216 additions and 496 deletions

View File

@@ -0,0 +1,10 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.26;
interface ICallback {
error UnauthorizedCaller(string exchange, address sender);
function handleCallback(
bytes calldata data
) external returns (bytes memory result);
}

View File

@@ -1,14 +0,0 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.26;
interface ICallbackVerifier {
error UnauthorizedCaller(string exchange, address sender);
/**
* @dev This method should revert if the sender is not a verified sender of the exchange.
*/
function verifyCallback(
address sender,
bytes calldata data
) external returns (uint256 amountOwed, address tokenOwed);
}

View File

@@ -24,10 +24,6 @@ interface IExecutor {
uint256 givenAmount,
bytes calldata data
) external payable returns (uint256 calculatedAmount);
function handleCallback(
bytes calldata callbackData
) external returns (bytes memory result);
}
interface IExecutorErrors {