2022-02-26 20:44:41 +00:00
|
|
|
pragma solidity ^0.7.0;
|
|
|
|
|
|
|
|
interface AaveInterface {
|
|
|
|
function deposit(
|
|
|
|
address _asset,
|
|
|
|
uint256 _amount,
|
|
|
|
address _onBehalfOf,
|
|
|
|
uint16 _referralCode
|
|
|
|
) external;
|
|
|
|
|
|
|
|
function withdraw(
|
|
|
|
address _asset,
|
|
|
|
uint256 _amount,
|
|
|
|
address _to
|
|
|
|
) external;
|
|
|
|
|
|
|
|
function borrow(
|
|
|
|
address _asset,
|
|
|
|
uint256 _amount,
|
|
|
|
uint256 _interestRateMode,
|
|
|
|
uint16 _referralCode,
|
|
|
|
address _onBehalfOf
|
|
|
|
) external;
|
|
|
|
|
|
|
|
function repay(
|
|
|
|
address _asset,
|
|
|
|
uint256 _amount,
|
|
|
|
uint256 _rateMode,
|
|
|
|
address _onBehalfOf
|
|
|
|
) external;
|
|
|
|
|
|
|
|
function setUserUseReserveAsCollateral(
|
|
|
|
address _asset,
|
|
|
|
bool _useAsCollateral
|
|
|
|
) external;
|
|
|
|
|
|
|
|
function swapBorrowRateMode(address _asset, uint256 _rateMode) external;
|
|
|
|
}
|
|
|
|
|
2022-02-26 20:58:09 +00:00
|
|
|
interface ATokenInterface {
|
|
|
|
function scaledBalanceOf(address _user) external view returns (uint256);
|
|
|
|
|
|
|
|
function isTransferAllowed(address _user, uint256 _amount)
|
|
|
|
external
|
|
|
|
view
|
|
|
|
returns (bool);
|
|
|
|
|
|
|
|
function balanceOf(address _user) external view returns (uint256);
|
|
|
|
|
|
|
|
function transferFrom(
|
|
|
|
address,
|
|
|
|
address,
|
|
|
|
uint256
|
|
|
|
) external returns (bool);
|
|
|
|
|
|
|
|
function allowance(address, address) external returns (uint256);
|
|
|
|
}
|
|
|
|
|
2022-02-26 20:44:41 +00:00
|
|
|
interface AaveLendingPoolProviderInterface {
|
2022-03-04 12:14:36 +00:00
|
|
|
function getPool() external view returns (address);
|
2022-02-26 20:44:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
interface AaveDataProviderInterface {
|
|
|
|
function getReserveTokensAddresses(address _asset)
|
|
|
|
external
|
|
|
|
view
|
|
|
|
returns (
|
|
|
|
address aTokenAddress,
|
|
|
|
address stableDebtTokenAddress,
|
|
|
|
address variableDebtTokenAddress
|
|
|
|
);
|
|
|
|
|
|
|
|
function getUserReserveData(address _asset, address _user)
|
|
|
|
external
|
|
|
|
view
|
|
|
|
returns (
|
|
|
|
uint256 currentATokenBalance,
|
|
|
|
uint256 currentStableDebt,
|
|
|
|
uint256 currentVariableDebt,
|
|
|
|
uint256 principalStableDebt,
|
|
|
|
uint256 scaledVariableDebt,
|
|
|
|
uint256 stableBorrowRate,
|
|
|
|
uint256 liquidityRate,
|
|
|
|
uint40 stableRateLastUpdated,
|
|
|
|
bool usageAsCollateralEnabled
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
interface AaveAddressProviderRegistryInterface {
|
|
|
|
function getAddressesProvidersList()
|
|
|
|
external
|
|
|
|
view
|
|
|
|
returns (address[] memory);
|
|
|
|
}
|