Skip to content

Commit

Permalink
chore: remove function in interface + small modif NATSPECs
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlinEgalite committed Jul 27, 2023
1 parent 82284e9 commit 5e8be49
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
4 changes: 1 addition & 3 deletions src/interfaces/IERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ pragma solidity >=0.5.0;

/// @dev Empty because we only call functions in assembly. It prevents calling
/// transfer (transferFrom) instead of safeTransfer (safeTransferFrom).
interface IERC20 {
function balanceOf(address owner) external view returns (uint256);
}
interface IERC20 {}
12 changes: 5 additions & 7 deletions src/interfaces/IFlashBorrower.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
pragma solidity >=0.5.0;

interface IFlashBorrower {
/**
* @dev Receives a flash loan.
* @param initiator The initiator of the loan.
* @param token The token lent.
* @param amount The amount of tokens lent.
* @param data Arbitrary data structure, intended to contain user-defined parameters.
*/
/// @dev Receives a flash loan.
/// @param initiator The initiator of the loan.
/// @param token The token lent.
/// @param amount The amount of tokens lent.
/// @param data Arbitrary data structure, intended to contain user-defined parameters.
function onFlashLoan(address initiator, address token, uint256 amount, bytes calldata data) external;
}
12 changes: 5 additions & 7 deletions src/interfaces/IFlashLender.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ pragma solidity >=0.5.0;
import {IFlashBorrower} from "src/interfaces/IFlashBorrower.sol";

interface IFlashLender {
/**
* @dev Initiate a flash loan.
* @param receiver The receiver of the tokens in the loan, and the receiver of the callback.
* @param token The token lent.
* @param amount The amount of tokens lent.
* @param data Arbitrary data structure, intended to contain user-defined parameters.
*/
/// @dev Initiate a flash loan.
/// @param receiver The receiver of the tokens in the loan, and the receiver of the callback.
/// @param token The token lent.
/// @param amount The amount of tokens lent.
/// @param data Arbitrary data structure, intended to contain user-defined parameters.
function flashLoan(IFlashBorrower receiver, address token, uint256 amount, bytes calldata data) external;
}

0 comments on commit 5e8be49

Please sign in to comment.