Consolidate webapp structure by merging nested components into the main repository

This commit is contained in:
defiQUG
2025-11-05 16:12:53 -08:00
parent 09c5a1fd5e
commit 3b09c35c47
55 changed files with 10240 additions and 0 deletions

View 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);
}