Created
June 11, 2020 11:10
-
-
Save RachBLondon/03ccda59c1f0c3b29a6fb123cfb7bd41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.0; | |
import 'https://github.com/aave/aave-protocol/blob/master/contracts/interfaces/ILendingPoolAddressesProvider.sol'; | |
import './ILendingPool.sol'; | |
import './IERC20.sol'; | |
contract AaveDeposit { | |
ILendingPoolAddressesProvider provider; | |
address dai; | |
uint amount; | |
constructor() public { | |
provider = ILendingPoolAddressesProvider(0x506B0B2CF20FAA8f38a4E2B524EE43e1f4458Cc5); | |
dai = 0xFf795577d9AC8bD7D90Ee22b6C1703490b6512FD; | |
amount = 1; | |
} | |
function makeDeposit() public payable { | |
ILendingPool lendingPool = ILendingPool(provider.getLendingPool()); | |
IERC20(dai).approve(provider.getLendingPoolCore(), amount); | |
lendingPool.deposit(dai, amount, 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Working with remix and Kovan, I keep getting the following error:
I have also tried: