IERC3156FlashBorrower.sol 841 B

12345678910111213141516171819202122232425262728
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. /**
  4. * @dev Interface of the ERC3156 FlashBorrower, as defined in
  5. * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].
  6. *
  7. * _Available since v4.1._
  8. */
  9. interface IERC3156FlashBorrower {
  10. /**
  11. * @dev Receive a flash loan.
  12. * @param initiator The initiator of the loan.
  13. * @param token The loan currency.
  14. * @param amount The amount of tokens lent.
  15. * @param fee The additional amount of tokens to repay.
  16. * @param data Arbitrary data structure, intended to contain user-defined parameters.
  17. * @return The keccak256 hash of "ERC3156FlashBorrower.onFlashLoan"
  18. */
  19. function onFlashLoan(
  20. address initiator,
  21. address token,
  22. uint256 amount,
  23. uint256 fee,
  24. bytes calldata data
  25. ) external returns (bytes32);
  26. }