Skip to content

Latest commit

 

History

History
209 lines (192 loc) · 6.96 KB

IERC3156FlashBorrower.md

File metadata and controls

209 lines (192 loc) · 6.96 KB

IERC3156FlashBorrower.sol

View Source: openzeppelin-solidity/contracts/interfaces/IERC3156FlashBorrower.sol

↘ Derived Contracts: MockFlashBorrower

IERC3156FlashBorrower

Interface of the ERC3156 FlashBorrower, as defined in https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. Available since v4.1.

Functions

onFlashLoan

Receive a flash loan.

function onFlashLoan(address initiator, address token, uint256 amount, uint256 fee, bytes data) external nonpayable
returns(bytes32)

Arguments

Name Type Description
initiator address The initiator of the loan.
token address The loan currency.
amount uint256 The amount of tokens lent.
fee uint256 The additional amount of tokens to repay.
data bytes Arbitrary data structure, intended to contain user-defined parameters.

Returns

The keccak256 hash of "ERC3156FlashBorrower.onFlashLoan"

Source Code
function onFlashLoan(
        address initiator,
        address token,
        uint256 amount,
        uint256 fee,
        bytes calldata data
    ) external returns (bytes32);

Contracts