Using Brownie for Interacting with Aave Protocol (Borrowing & Repaying)
This article is about what to do for using Brownie for Aave protocol after depositing WETH in the Aave lending pool. In our next step, we will try to borrow some Dai. To do this, we should add some dependency contracts to the contracts folder such as AggregatorV3Interface.sol and LinkTokenInterface.sol. We should also modify the deploy.py and brownie-config.yaml files to adapt to our new functionality.
Adding the necessary contracts to the contracts folder
In this 3rd part of the tutorial, after depositing ETH into the pool, it is time to borrow some DAI using our WETH collateral.
There are 2 interfaces to add to the interfaces folder:
1. AggregatorV3Interface.sol
2. LinkTokenInterface.sol
pragma solidity ^ 0.6.6;
interface LinkTokenInterface
function allowance(address owner, address spender) external view returns (uint256 remaining);
function approve(address spender, uint256 value) external returns (bool success);
function balanceOf(ad...