Skip to content

Latest commit

 

History

History
260 lines (232 loc) · 7.55 KB

FaultyAaveLendingPool.md

File metadata and controls

260 lines (232 loc) · 7.55 KB

FaultyAaveLendingPool.sol

View Source: contracts/fakes/FaultyAaveLendingPool.sol

↗ Extends: IAaveV2LendingPoolLike, ERC20

FaultyAaveLendingPool

Contract Members

Constants & Variables

contract FakeToken public aToken;

Functions

function (FakeToken _aToken) public nonpayable ERC20 

Arguments

Name Type Description
_aToken FakeToken
Source Code
constructor(FakeToken _aToken) ERC20("aStablecoin", "aStablecoin") {
    aToken = _aToken;
  }

deposit

function deposit(address asset, uint256 amount, address , uint16 ) external nonpayable

Arguments

Name Type Description
asset address
amount uint256
address
uint16
Source Code
function deposit(
    address asset,
    uint256 amount,
    address,
    uint16
  ) external override {
    IERC20(asset).transferFrom(msg.sender, address(this), amount);
  }

withdraw

function withdraw(address , uint256 amount, address ) external nonpayable
returns(uint256)

Arguments

Name Type Description
address
amount uint256
address
Source Code
function withdraw(
    address, /*asset*/
    uint256 amount,
    address /*to*/
  ) external override returns (uint256) {
    aToken.transferFrom(msg.sender, address(this), amount);
    return amount;
  }

Contracts