Skip to content

Commit

Permalink
fix: config engine payload bnb (#181)
Browse files Browse the repository at this point in the history
* fix: config engine payload bnb

* fix: e2e test to not allow isolated assets as good collateral
  • Loading branch information
brotherlymite authored Nov 22, 2023
1 parent 428dc96 commit cb11211
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ProtocolV3TestBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ contract ProtocolV3TestBase is CommonTestBase {
configs[i].usageAsCollateralEnabled &&
// not stable borrowable as this makes testing stable borrowing unnecessary hard to reason about
!configs[i].stableBorrowRateEnabled &&
// not isolated asset as we can only borrow stablecoins against it
configs[i].debtCeiling == 0 &&
// supply cap not yet reached
((configs[i].supplyCap * 10 ** configs[i].decimals) >
IERC20(configs[i].aToken).totalSupply()) &&
Expand Down
15 changes: 15 additions & 0 deletions src/v3-config-engine/AaveV3PayloadBnb.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Bnb} from 'aave-address-book/AaveV3Bnb.sol';
import './AaveV3Payload.sol';

/**
* @dev Base smart contract for an Aave v3.0.2 (compatible with 3.0.0) listing on v3 Bnb.
* @author BGD Labs
*/
abstract contract AaveV3PayloadBnb is AaveV3Payload(IEngine(AaveV3Bnb.CONFIG_ENGINE)) {
function getPoolContext() public pure override returns (IEngine.PoolContext memory) {
return IEngine.PoolContext({networkName: 'BNB Smart Chain', networkAbbreviation: 'Bnb'});
}
}

0 comments on commit cb11211

Please sign in to comment.