smart-contract-fiesta
/
organized_contracts
/15
/15002e7a7be05692b18f8d047c0f9c36e4288819383c0a416d6431ec59e87417
/IERC3156FlashBorrower.sol
// This contract is part of Zellic’s smart contract dataset, which is a collection of publicly available contract code gathered as of March 2023. | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC3156FlashBorrower.sol) | |
pragma solidity ^0.8.0; | |
/** | |
* @dev Interface of the ERC3156 FlashBorrower, as defined in | |
* https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. | |
* | |
* _Available since v4.1._ | |
*/ | |
interface IERC3156FlashBorrower { | |
/** | |
* @dev Receive a flash loan. | |
* @param initiator The initiator of the loan. | |
* @param token The loan currency. | |
* @param amount The amount of tokens lent. | |
* @param fee The additional amount of tokens to repay. | |
* @param data Arbitrary data structure, intended to contain user-defined parameters. | |
* @return The keccak256 hash of "IERC3156FlashBorrower.onFlashLoan" | |
*/ | |
function onFlashLoan( | |
address initiator, | |
address token, | |
uint256 amount, | |
uint256 fee, | |
bytes calldata data | |
) external returns (bytes32); | |
} | |