mirror of
https://github.com/status-im/EIPs.git
synced 2025-02-22 19:58:06 +00:00
Automatically merged updates to draft EIP(s) 3234 (#3458)
Hi, I'm a bot! This change was automatically merged because: - It only modifies existing Draft, Review, or Last Call EIP(s) - The PR was approved or written by at least one author of each modified EIP - The build is passing
This commit is contained in:
parent
bdb02678be
commit
559bf352fd
@ -61,8 +61,8 @@ interface IERC3234BatchFlashLender {
|
||||
*/
|
||||
function batchFlashLoan(
|
||||
IERC3234BatchFlashBorrower receiver,
|
||||
address[] calldata token,
|
||||
uint256[] calldata amount,
|
||||
address[] calldata tokens,
|
||||
uint256[] calldata amounts,
|
||||
bytes[] calldata data
|
||||
) external returns (bool);
|
||||
}
|
||||
@ -83,7 +83,13 @@ function batchFlashLoan(
|
||||
) external returns (bool) {
|
||||
...
|
||||
require(
|
||||
receiver.onBatchFlashLoan(msg.sender, tokens, amounts, fees, data),
|
||||
receiver.onBatchFlashLoan(
|
||||
msg.sender,
|
||||
tokens,
|
||||
amounts,
|
||||
fees,
|
||||
data
|
||||
) == keccak256("ERC3234BatchFlashBorrower.onBatchFlashLoan"),
|
||||
"IERC3234: Callback failed"
|
||||
);
|
||||
...
|
||||
@ -106,20 +112,20 @@ If successful, `batchFlashLoan` MUST return `true`.
|
||||
|
||||
### Receiver Specification
|
||||
|
||||
A `receiver` of flash loans MUST implement the IERC3234FlashBorrower interface:
|
||||
A `receiver` of flash loans MUST implement the IERC3234BatchFlashBorrower interface:
|
||||
|
||||
```
|
||||
pragma solidity ^0.7.0 || ^0.8.0;
|
||||
|
||||
|
||||
interface IERC3234FlashBorrower {
|
||||
interface IERC3234BatchFlashBorrower {
|
||||
|
||||
/**
|
||||
* @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 tokens The loan currency.
|
||||
* @param amounts The amount of tokens lent.
|
||||
* @param fees The additional amount of tokens to repay.
|
||||
* @param data Arbitrary data structure, intended to contain user-defined parameters.
|
||||
* @return The keccak256 hash of "ERC3234BatchFlashBorrower.onBatchFlashLoan"
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user