mirror of
https://github.com/Instadapp/dsa-polygon-migration.git
synced 2024-07-29 22:27:58 +00:00
103 lines
3.2 KiB
Solidity
103 lines
3.2 KiB
Solidity
pragma solidity >=0.7.0;
|
|
pragma experimental ABIEncoderV2;
|
|
|
|
interface AccountInterface {
|
|
function enable(address) external;
|
|
function disable(address) external;
|
|
function isAuth(address) external view returns (bool);
|
|
function castMigrate(
|
|
string[] calldata _targets,
|
|
bytes[] calldata _datas,
|
|
address _origin
|
|
) external payable returns (bytes32);
|
|
function version() external view returns (uint);
|
|
}
|
|
|
|
interface TokenMappingInterface {
|
|
function getMapping(address) external view returns (address);
|
|
}
|
|
|
|
struct AaveData {
|
|
address targetDsa;
|
|
uint[] supplyAmts;
|
|
uint[] borrowAmts;
|
|
address[] supplyTokens;
|
|
address[] borrowTokens;
|
|
}
|
|
|
|
interface IndexInterface {
|
|
function master() external view returns (address);
|
|
}
|
|
|
|
interface AaveLendingPoolProviderInterface {
|
|
function getLendingPool() external view returns (address);
|
|
}
|
|
|
|
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
|
|
);
|
|
function getReserveConfigurationData(address asset) external view returns (
|
|
uint256 decimals,
|
|
uint256 ltv,
|
|
uint256 liquidationThreshold,
|
|
uint256 liquidationBonus,
|
|
uint256 reserveFactor,
|
|
bool usageAsCollateralEnabled,
|
|
bool borrowingEnabled,
|
|
bool stableBorrowRateEnabled,
|
|
bool isActive,
|
|
bool isFrozen
|
|
);
|
|
function getReserveData(address asset) external view returns (
|
|
uint256 availableLiquidity,
|
|
uint256 totalStableDebt,
|
|
uint256 totalVariableDebt,
|
|
uint256 liquidityRate,
|
|
uint256 variableBorrowRate,
|
|
uint256 stableBorrowRate,
|
|
uint256 averageStableBorrowRate,
|
|
uint256 liquidityIndex,
|
|
uint256 variableBorrowIndex,
|
|
uint40 lastUpdateTimestamp
|
|
);
|
|
}
|
|
|
|
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 getUserAccountData(address user) external view returns (
|
|
uint256 totalCollateralETH,
|
|
uint256 totalDebtETH,
|
|
uint256 availableBorrowsETH,
|
|
uint256 currentLiquidationThreshold,
|
|
uint256 ltv,
|
|
uint256 healthFactor
|
|
);
|
|
}
|
|
|
|
interface InstaListInterface {
|
|
function accountID(address) external view returns (uint);
|
|
} |