-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from morpho-org/feat/adapt-swap
feat(swap): adapting the swap with an interface ISwap
- Loading branch information
Showing
3 changed files
with
57 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
pragma solidity ^0.8.0; | ||
|
||
/** | ||
* @title ISwap | ||
* @dev Interface for the SwapMock contract. | ||
*/ | ||
interface ISwap { | ||
/** | ||
* @dev Swaps collateral token to loan token. | ||
* @param amount The amount of collateral token to swap. | ||
* @return returnedAmount The amount of loan token returned. | ||
*/ | ||
function swapCollatToLoan(uint256 amount) external returns (uint256 returnedAmount); | ||
|
||
/** | ||
* @dev Swaps loan token to collateral token. | ||
* @param amount The amount of loan token to swap. | ||
* @return returnedAmount The amount of collateral token returned. | ||
*/ | ||
function swapLoanToCollat(uint256 amount) external returns (uint256 returnedAmount); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters