View Source: contracts/fakes/FakeAaveLendingPool.sol
↗ Extends: IAaveV2LendingPoolLike, ERC20
FakeAaveLendingPool
Constants & Variables
contract FakeToken public aToken;
- constructor(FakeToken _aToken)
- deposit(address asset, uint256 amount, address , uint16 )
- withdraw(address asset, uint256 amount, address to)
function (FakeToken _aToken) public nonpayable ERC20
Arguments
Name | Type | Description |
---|---|---|
_aToken | FakeToken |
Source Code
constructor(FakeToken _aToken) ERC20("aDAI", "aDAI") {
aToken = _aToken;
}
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);
aToken.mint(msg.sender, amount);
}
function withdraw(address asset, uint256 amount, address to) external nonpayable
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
asset | address | |
amount | uint256 | |
to | address |
Source Code
function withdraw(
address asset,
uint256 amount,
address to
) external override returns (uint256) {
aToken.transferFrom(msg.sender, address(this), amount);
FakeToken dai = FakeToken(asset);
uint256 interest = (amount * 10) / 100;
dai.mint(address(this), interest);
dai.transfer(to, amount + interest);
return amount;
}
- AaveStrategy
- AccessControl
- AccessControlLibV1
- Address
- BaseLibV1
- BokkyPooBahsDateTimeLibrary
- BondPool
- BondPoolBase
- BondPoolLibV1
- CompoundStrategy
- Context
- Controller
- Cover
- CoverBase
- CoverLibV1
- CoverProvision
- CoverReassurance
- CoverStake
- CoverUtilV1
- cxToken
- cxTokenFactory
- cxTokenFactoryLibV1
- Destroyable
- ERC165
- ERC20
- FakeAaveLendingPool
- FakeCompoundERC20Delegator
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- Finalization
- Governance
- GovernanceUtilV1
- IAaveV2LendingPoolLike
- IAccessControl
- IBondPool
- IClaimsProcessor
- ICommission
- ICompoundERC20DelegatorLike
- ICover
- ICoverProvision
- ICoverReassurance
- ICoverStake
- ICxToken
- ICxTokenFactory
- IERC165
- IERC20
- IERC20Detailed
- IERC20Metadata
- IERC3156FlashBorrower
- IERC3156FlashLender
- IFinalization
- IGovernance
- ILendingStrategy
- IMember
- IPausable
- IPolicy
- IPolicyAdmin
- IPriceDiscovery
- IProtocol
- IRecoverable
- IReporter
- IResolution
- IResolvable
- IStakingPools
- IStore
- IUniswapV2FactoryLike
- IUniswapV2PairLike
- IUniswapV2RouterLike
- IUnstakable
- IVault
- IVaultFactory
- IWitness
- LiquidityEngine
- MaliciousToken
- Migrations
- MockCxToken
- MockCxTokenPolicy
- MockCxTokenStore
- MockProcessorStore
- MockProcessorStoreLib
- MockProtocol
- MockStore
- MockVault
- NTransferUtilV2
- NTransferUtilV2Intermediate
- Ownable
- Pausable
- Policy
- PolicyAdmin
- PolicyHelperV1
- PriceDiscovery
- PriceLibV1
- Processor
- ProtoBase
- Protocol
- ProtoUtilV1
- Recoverable
- ReentrancyGuard
- RegistryLibV1
- Reporter
- Resolution
- Resolvable
- RoutineInvokerLibV1
- SafeERC20
- StakingPoolBase
- StakingPoolCoreLibV1
- StakingPoolInfo
- StakingPoolLibV1
- StakingPoolReward
- StakingPools
- Store
- StoreBase
- StoreKeyUtil
- StrategyLibV1
- Strings
- Unstakable
- ValidationLibV1
- Vault
- VaultBase
- VaultFactory
- VaultFactoryLibV1
- VaultLibV1
- WithFlashLoan
- Witness