flashLoan gas test
This commit is contained in:
@@ -34,10 +34,6 @@ contract FlashBorrower is IERC3156FlashBorrower {
|
||||
payer = _payer;
|
||||
}
|
||||
|
||||
function flash(address token, uint256 amount) external {
|
||||
PartyPool(pool).flashLoan(IERC3156FlashBorrower(address(this)), token, amount, "");
|
||||
}
|
||||
|
||||
function onFlashLoan(
|
||||
address /*initiator*/,
|
||||
address token,
|
||||
@@ -416,7 +412,7 @@ contract GasTest is Test {
|
||||
|
||||
// Execute flash loan 10 times to measure gas
|
||||
for (uint256 i = 0; i < 10; i++) {
|
||||
borrower.flash(token, amount);
|
||||
pool2.flashLoan(borrower, token, amount, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user