IERC3156FlashBorrower.sol 905 B

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