dsa-connectors/contracts/mainnet/connectors/aave/v1/interface.sol
2022-03-22 20:54:40 +05:30

43 lines
1.6 KiB
Solidity

//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
interface AaveInterface {
function deposit(address _reserve, uint256 _amount, uint16 _referralCode) external payable;
function redeemUnderlying(
address _reserve,
address payable _user,
uint256 _amount,
uint256 _aTokenBalanceAfterRedeem
) external;
function setUserUseReserveAsCollateral(address _reserve, bool _useAsCollateral) external;
function getUserReserveData(address _reserve, address _user) external view returns (
uint256 currentATokenBalance,
uint256 currentBorrowBalance,
uint256 principalBorrowBalance,
uint256 borrowRateMode,
uint256 borrowRate,
uint256 liquidityRate,
uint256 originationFee,
uint256 variableBorrowIndex,
uint256 lastUpdateTimestamp,
bool usageAsCollateralEnabled
);
function borrow(address _reserve, uint256 _amount, uint256 _interestRateMode, uint16 _referralCode) external;
function repay(address _reserve, uint256 _amount, address payable _onBehalfOf) external payable;
}
interface AaveProviderInterface {
function getLendingPool() external view returns (address);
function getLendingPoolCore() external view returns (address);
}
interface AaveCoreInterface {
function getReserveATokenAddress(address _reserve) external view returns (address);
}
interface ATokenInterface {
function redeem(uint256 _amount) external;
function balanceOf(address _user) external view returns(uint256);
function principalBalanceOf(address _user) external view returns(uint256);
}