Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme.md 修复合约没有继承接口的问题 #609

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions 57_Flashloan/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ interface IFlashLoanSimpleReceiver {
}

// AAVE V3闪电贷合约
contract AaveV3Flashloan {
contract AaveV3Flashloan is IFlashLoanSimpleReceiver{
address private constant AAVE_V3_POOL =
0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2;

Expand All @@ -417,6 +417,7 @@ contract AaveV3Flashloan {
// 闪电贷回调函数,只能被 pool 合约调用
function executeOperation(address asset, uint256 amount, uint256 premium, address initiator, bytes calldata)
external
override
returns (bool)
{
// 确认调用的是 DAI/WETH pair 合约
Expand Down Expand Up @@ -493,4 +494,4 @@ forge test --fork-url $FORK_URL --match-path test/AaveV3Flashloan.t.sol -vv

这一讲,我们介绍了闪电贷,它允许用户在一个交易中借出并迅速归还资金,而无需提供任何抵押。并且,我们分别实现了Uniswap V2,Uniswap V3,和AAVE的闪电贷合约。

通过闪电贷,我们能够无抵押的撬动海量资金进行无风险套利或漏洞攻击。你准备用闪电贷做些什么呢?
通过闪电贷,我们能够无抵押的撬动海量资金进行无风险套利或漏洞攻击。你准备用闪电贷做些什么呢?