Skip to content
Lattice

IERC20FlashMint

Git Source

Inherits: IERC3156FlashLender

Title: IERC20FlashMint

Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC20FlashMint.sol)

Interface for the ERC-20 ERC-3156 flash-mint extension: the token itself is the flash lender.

Adds no functions over IERC3156FlashLender; declares the revert reasons for ABI/decoding.

Errors

ERC3156UnsupportedToken

The loan token is not valid (only address(this) is supported).

error ERC3156UnsupportedToken(address token);

Parameters

NameTypeDescription
tokenaddress

ERC3156ExceededMaxLoan

The requested loan exceeds the max loan value for token.

error ERC3156ExceededMaxLoan(uint256 maxLoan);

Parameters

NameTypeDescription
maxLoanuint256

ERC3156InvalidReceiver

The receiver of a flash loan is not a valid IERC3156FlashBorrower.onFlashLoan implementer.

error ERC3156InvalidReceiver(address receiver);

Parameters

NameTypeDescription
receiveraddress