35 lines
944 B
Solidity
35 lines
944 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.20;
|
|
|
|
/**
|
|
* @title IAdapter
|
|
* @notice Interface for protocol adapters
|
|
*/
|
|
interface IAdapter {
|
|
/**
|
|
* @notice Execute a step using this adapter
|
|
* @param data Encoded step parameters
|
|
* @return success Whether execution succeeded
|
|
* @return returnData Return data from execution
|
|
*/
|
|
function executeStep(bytes calldata data) external returns (bool success, bytes memory returnData);
|
|
|
|
/**
|
|
* @notice Prepare step (2PC prepare phase)
|
|
* @param data Encoded step parameters
|
|
* @return prepared Whether preparation succeeded
|
|
*/
|
|
function prepareStep(bytes calldata data) external returns (bool prepared);
|
|
|
|
/**
|
|
* @notice Get adapter name
|
|
*/
|
|
function name() external view returns (string memory);
|
|
|
|
/**
|
|
* @notice Get adapter type (DEFI or FIAT_DTL)
|
|
*/
|
|
function adapterType() external view returns (uint8);
|
|
}
|
|
|