Skip to content

Commit

Permalink
fix: update for aligned BNB
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Dec 4, 2023
1 parent 251864a commit b49a36e
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 29 deletions.
2 changes: 1 addition & 1 deletion lib/aave-address-book
Submodule aave-address-book updated 72 files
+8 −0 CHANGELOG.md
+1 −1 package.json
+9 −0 scripts/configs/networks/ethereum.ts
+9 −0 scripts/configs/networks/polygon.ts
+1 −1 scripts/configs/pools/arbitrum.ts
+1 −1 scripts/configs/pools/avalanche.ts
+1 −0 scripts/configs/pools/base.ts
+2 −2 scripts/configs/pools/bnb.ts
+2 −1 scripts/configs/pools/ethereum.ts
+1 −0 scripts/configs/pools/gnosis.ts
+1 −0 scripts/configs/pools/metis.ts
+1 −1 scripts/configs/pools/optimism.ts
+2 −1 scripts/configs/pools/polygon.ts
+5 −3 scripts/generateAddresses.ts
+5 −1 scripts/generator/assetsLibraryGenerator.ts
+1 −1 scripts/generator/clients.ts
+3 −1 src/AaveAddressBook.sol
+6 −6 src/AaveV2Avalanche.sol
+14 −14 src/AaveV2Ethereum.sol
+2 −2 src/AaveV2EthereumAMM.sol
+6 −6 src/AaveV2Polygon.sol
+61 −16 src/AaveV3Arbitrum.sol
+48 −12 src/AaveV3Avalanche.sol
+3 −3 src/AaveV3BNB.sol
+14 −2 src/AaveV3Base.sol
+53 −12 src/AaveV3Ethereum.sol
+24 −0 src/AaveV3Gnosis.sol
+22 −4 src/AaveV3Metis.sol
+51 −0 src/AaveV3Mumbai.sol
+74 −14 src/AaveV3Optimism.sol
+70 −10 src/AaveV3Polygon.sol
+27 −0 src/AaveV3Sepolia.sol
+11 −0 src/MiscMumbai.sol
+11 −0 src/MiscSepolia.sol
+3 −1 src/ts/AaveAddressBook.ts
+3 −3 src/ts/AaveV2Avalanche.ts
+7 −7 src/ts/AaveV2Ethereum.ts
+2 −2 src/ts/AaveV2EthereumAMM.ts
+3 −3 src/ts/AaveV2Polygon.ts
+24 −24 src/ts/AaveV3Arbitrum.ts
+19 −19 src/ts/AaveV3Avalanche.ts
+0 −0 src/ts/AaveV3BNB.ts
+7 −1 src/ts/AaveV3Base.ts
+31 −11 src/ts/AaveV3Ethereum.ts
+10 −0 src/ts/AaveV3Gnosis.ts
+10 −2 src/ts/AaveV3Metis.ts
+19 −0 src/ts/AaveV3Mumbai.ts
+30 −20 src/ts/AaveV3Optimism.ts
+26 −26 src/ts/AaveV3Polygon.ts
+11 −0 src/ts/AaveV3Sepolia.ts
+6 −0 src/ts/MiscMumbai.ts
+6 −0 src/ts/MiscSepolia.ts
+65 −65 src/ts/abis/AggregatorInterface.ts
+377 −377 src/ts/abis/IAToken.ts
+349 −349 src/ts/abis/IAaveGovernanceV2.ts
+82 −82 src/ts/abis/IAaveOracle.ts
+183 −183 src/ts/abis/ICollector.ts
+741 −741 src/ts/abis/ICrossChainController.ts
+96 −96 src/ts/abis/IDataWarehouse.ts
+56 −56 src/ts/abis/IDefaultInterestRateStrategy.ts
+77 −77 src/ts/abis/IERC20.ts
+34 −34 src/ts/abis/IExecutor.ts
+229 −229 src/ts/abis/IExecutorWithTimelock.ts
+660 −660 src/ts/abis/IGovernanceCore.ts
+8 −8 src/ts/abis/IGovernancePowerStrategy.ts
+27 −27 src/ts/abis/IOwnable.ts
+245 −245 src/ts/abis/IPayloadsControllerCore.ts
+54 −54 src/ts/abis/IRescuable.ts
+251 −251 src/ts/abis/IVotingMachineWithProofs.ts
+84 −84 src/ts/abis/IVotingPortal.ts
+22 −22 src/ts/abis/IVotingStrategy.ts
+23 −23 src/ts/abis/IWithGuardian.ts
20 changes: 10 additions & 10 deletions scripts/AaveV3ConfigEngine.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {AaveV3ConfigEngine as Engine} from '../src/v3-config-engine/AaveV3Config
import {IAaveV3ConfigEngine as IEngine} from '../src/v3-config-engine/IAaveV3ConfigEngine.sol';
import {IV3RateStrategyFactory} from '../src/v3-config-engine/IV3RateStrategyFactory.sol';
import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';
import {AaveV3Bnb} from 'aave-address-book/AaveV3Bnb.sol';
import {AaveV3BNB} from 'aave-address-book/AaveV3BNB.sol';
import {AaveV3Optimism} from 'aave-address-book/AaveV3Optimism.sol';
import {AaveV3Arbitrum} from 'aave-address-book/AaveV3Arbitrum.sol';
import {AaveV3Polygon} from 'aave-address-book/AaveV3Polygon.sol';
Expand Down Expand Up @@ -298,20 +298,20 @@ library DeployEngineBnbLib {
capsEngine: Create2Utils._create2Deploy('v1', type(CapsEngine).creationCode)
});
IEngine.EngineConstants memory engineConstants = IEngine.EngineConstants({
pool: AaveV3Bnb.POOL,
poolConfigurator: AaveV3Bnb.POOL_CONFIGURATOR,
ratesStrategyFactory: IV3RateStrategyFactory(AaveV3Bnb.RATES_FACTORY),
oracle: AaveV3Bnb.ORACLE,
rewardsController: AaveV3Bnb.DEFAULT_INCENTIVES_CONTROLLER,
collector: address(AaveV3Bnb.COLLECTOR)
pool: AaveV3BNB.POOL,
poolConfigurator: AaveV3BNB.POOL_CONFIGURATOR,
ratesStrategyFactory: IV3RateStrategyFactory(AaveV3BNB.RATES_FACTORY),
oracle: AaveV3BNB.ORACLE,
rewardsController: AaveV3BNB.DEFAULT_INCENTIVES_CONTROLLER,
collector: address(AaveV3BNB.COLLECTOR)
});

return
address(
new Engine(
AaveV3Bnb.DEFAULT_A_TOKEN_IMPL_REV_1,
AaveV3Bnb.DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_REV_1,
AaveV3Bnb.DEFAULT_STABLE_DEBT_TOKEN_IMPL_REV_1,
AaveV3BNB.DEFAULT_A_TOKEN_IMPL_REV_1,
AaveV3BNB.DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_REV_1,
AaveV3BNB.DEFAULT_STABLE_DEBT_TOKEN_IMPL_REV_1,
engineConstants,
engineLibraries
)
Expand Down
12 changes: 3 additions & 9 deletions scripts/FreezingStewards.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,17 @@ pragma solidity ^0.8.0;

import '../src/ScriptUtils.sol';
import {FreezingSteward} from '../src/riskstewards/FreezingSteward.sol';
import {AaveV3Bnb} from 'aave-address-book/AaveV3Bnb.sol';
import {AaveV3BNB} from 'aave-address-book/AaveV3BNB.sol';
import {AaveV3Gnosis} from 'aave-address-book/AaveV3Gnosis.sol';

contract DeployGno is GnosisScript {
function run() external broadcast {
new FreezingSteward(
AaveV3Gnosis.ACL_MANAGER,
AaveV3Gnosis.POOL_CONFIGURATOR
);
new FreezingSteward(AaveV3Gnosis.ACL_MANAGER, AaveV3Gnosis.POOL_CONFIGURATOR);
}
}

contract DeployBnb is BNBScript {
function run() external broadcast {
new FreezingSteward(
AaveV3Bnb.ACL_MANAGER,
AaveV3Bnb.POOL_CONFIGURATOR
);
new FreezingSteward(AaveV3BNB.ACL_MANAGER, AaveV3BNB.POOL_CONFIGURATOR);
}
}
10 changes: 5 additions & 5 deletions scripts/RiskStewards.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {AaveV3Arbitrum} from 'aave-address-book/AaveV3Arbitrum.sol';
import {AaveV3Optimism} from 'aave-address-book/AaveV3Optimism.sol';
import {AaveV3Base} from 'aave-address-book/AaveV3Base.sol';
import {AaveV3Gnosis} from 'aave-address-book/AaveV3Gnosis.sol';
import {AaveV3Bnb} from 'aave-address-book/AaveV3Bnb.sol';
import {AaveV3BNB} from 'aave-address-book/AaveV3BNB.sol';

contract DeployEth is EthereumScript {
function run() external broadcast {
Expand Down Expand Up @@ -94,12 +94,12 @@ contract DeployGno is GnosisScript {
}
}

contract DeployBnb is BNBScript {
contract DeployBNB is BNBScript {
function run() external broadcast {
new CapsPlusRiskSteward(
AaveV3Bnb.AAVE_PROTOCOL_DATA_PROVIDER,
IAaveV3ConfigEngine(AaveV3Bnb.CONFIG_ENGINE),
AaveV3BNB.AAVE_PROTOCOL_DATA_PROVIDER,
IAaveV3ConfigEngine(AaveV3BNB.CONFIG_ENGINE),
0x126dc589cc75f17385dD95516F3F1788d862E7bc
);
}
}
}
4 changes: 2 additions & 2 deletions scripts/V3RateStrategyFactory.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {AaveV3Avalanche} from 'aave-address-book/AaveV3Avalanche.sol';
import {AaveV3Metis} from 'aave-address-book/AaveV3Metis.sol';
import {AaveV3Base} from 'aave-address-book/AaveV3Base.sol';
import {AaveV3Gnosis} from 'aave-address-book/AaveV3Gnosis.sol';
import {AaveV3Bnb} from 'aave-address-book/AaveV3Bnb.sol';
import {AaveV3BNB} from 'aave-address-book/AaveV3BNB.sol';
import {ITransparentProxyFactory} from 'solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol';
import {V3RateStrategyFactory} from '../src/v3-config-engine/V3RateStrategyFactory.sol';

Expand Down Expand Up @@ -175,7 +175,7 @@ library DeployRatesFactoryBnbLib {
function deploy() internal returns (address, address[] memory) {
return
DeployRatesFactoryLib._createAndSetupRatesFactory(
AaveV3Bnb.POOL_ADDRESSES_PROVIDER,
AaveV3BNB.POOL_ADDRESSES_PROVIDER,
MiscBNB.TRANSPARENT_PROXY_FACTORY,
MiscBNB.PROXY_ADMIN
);
Expand Down
4 changes: 2 additions & 2 deletions src/v3-config-engine/AaveV3PayloadBnb.sol
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Bnb} from 'aave-address-book/AaveV3Bnb.sol';
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)) {
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'});
}
Expand Down

0 comments on commit b49a36e

Please sign in to comment.