Skip to content

Commit

Permalink
feat: updates and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Valeri committed Aug 29, 2022
1 parent 8b9221b commit 8d12d79
Show file tree
Hide file tree
Showing 6 changed files with 195 additions and 129 deletions.
2 changes: 1 addition & 1 deletion contracts/deployments/ReservesSetupHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ contract ReservesSetupHelper is Ownable {

if (inputParams[i].borrowingEnabled) {
configurator.setReserveBorrowing(inputParams[i].asset, true);
configurator.setReserveFlashLoaning(inputParams[i].asset, inputParams[i].flashLoanEnabled);

configurator.setBorrowCap(inputParams[i].asset, inputParams[i].borrowCap);
configurator.setReserveStableRateBorrowing(
inputParams[i].asset,
inputParams[i].stableBorrowingEnabled
);
}
configurator.setReserveFlashLoaning(inputParams[i].asset, inputParams[i].flashLoanEnabled);
configurator.setSupplyCap(inputParams[i].asset, inputParams[i].supplyCap);
configurator.setReserveFactor(inputParams[i].asset, inputParams[i].reserveFactor);
}
Expand Down
12 changes: 12 additions & 0 deletions contracts/misc/AaveProtocolDataProvider.sol
Original file line number Diff line number Diff line change
Expand Up @@ -374,4 +374,16 @@ contract AaveProtocolDataProvider is IPoolDataProvider {

return (reserve.interestRateStrategyAddress);
}

/**
* @notice Returns whether the reserve has FlashLoans enabled or disabled
* @param asset The address of the underlying asset of the reserve
* @return enabled True if FlashLoans are enabled, False if disabled
* */
function getFlashLoanEnabled(address asset) external view returns (bool) {
DataTypes.ReserveConfigurationMap memory configuration = IPool(ADDRESSES_PROVIDER.getPool())
.getConfiguration(asset);

return configuration.getFlashLoanEnabled();
}
}
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"prepublish": "npm run compile"
},
"devDependencies": {
"@aave/deploy-v3": "1.24.0-beta.0",
"@aave/deploy-v3": "1.24.0-beta.2",
"@aave/periphery-v3": "1.18.0",
"@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.3.0-beta.13",
"@tenderly/hardhat-tenderly": "1.1.0-beta.5",
Expand Down
Loading

0 comments on commit 8d12d79

Please sign in to comment.