Consolidate webapp structure by merging nested components into the main repository
This commit is contained in:
54
contracts/interfaces/IComboHandler.sol
Normal file
54
contracts/interfaces/IComboHandler.sol
Normal file
@@ -0,0 +1,54 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
interface IComboHandler {
|
||||
enum StepType {
|
||||
BORROW,
|
||||
SWAP,
|
||||
REPAY,
|
||||
PAY,
|
||||
DEPOSIT,
|
||||
WITHDRAW,
|
||||
BRIDGE
|
||||
}
|
||||
|
||||
enum ExecutionStatus {
|
||||
PENDING,
|
||||
IN_PROGRESS,
|
||||
COMPLETE,
|
||||
FAILED,
|
||||
ABORTED
|
||||
}
|
||||
|
||||
struct Step {
|
||||
StepType stepType;
|
||||
bytes data; // Encoded step-specific parameters
|
||||
address target; // Target contract address (adapter or protocol)
|
||||
uint256 value; // ETH value to send (if applicable)
|
||||
}
|
||||
|
||||
struct StepReceipt {
|
||||
uint256 stepIndex;
|
||||
bool success;
|
||||
bytes returnData;
|
||||
uint256 gasUsed;
|
||||
}
|
||||
|
||||
function executeCombo(
|
||||
bytes32 planId,
|
||||
Step[] calldata steps,
|
||||
bytes calldata signature
|
||||
) external returns (bool success, StepReceipt[] memory receipts);
|
||||
|
||||
function prepare(
|
||||
bytes32 planId,
|
||||
Step[] calldata steps
|
||||
) external returns (bool prepared);
|
||||
|
||||
function commit(bytes32 planId) external returns (bool committed);
|
||||
|
||||
function abort(bytes32 planId) external;
|
||||
|
||||
function getExecutionStatus(bytes32 planId) external view returns (ExecutionStatus status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user