Skip to content

Commit

Permalink
chore: bnb deploy script (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
brotherlymite authored Nov 22, 2023
1 parent e9c96e4 commit 5bb44b2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ ethereumv2 :; make deploy-ledger contract=scripts/Deploy.s.sol:EthereumV2 chain=
ethereumv3 :; make deploy-ledger contract=scripts/Deploy.s.sol:EthereumV3 chain=mainnet

basev3 :; make deploy-ledger contract=scripts/Deploy.s.sol:BaseV3 chain=base
bnbv3 :; make deploy-ledger contract=scripts/Deploy.s.sol:BNBV3 chain=bnb
2 changes: 2 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ arbitrum = "${RPC_ARBITRUM}"
fantom = "${RPC_FANTOM}"
harmony = "${RPC_HARMONY}"
base = "${RPC_BASE}"
bnb = "${RPC_BNB}"

[etherscan]
mainnet={key="${ETHERSCAN_API_KEY_MAINNET}",chainId=1}
Expand All @@ -26,5 +27,6 @@ polygon={key="${ETHERSCAN_API_KEY_POLYGON}",chainId=137}
arbitrum={key="${ETHERSCAN_API_KEY_ARBITRUM}",chainId=42161}
fantom={key="${ETHERSCAN_API_KEY_FANTOM}",chainId=250}
base={key="${ETHERSCAN_API_KEY_BASE}",chainId=8453}
bnb={key="${ETHERSCAN_API_KEY_BNB}",chainId=56,url='https://api.bscscan.com/api'}

# See more config options https://github.com/gakonst/foundry/tree/master/config
2 changes: 1 addition & 1 deletion lib/aave-address-book
Submodule aave-address-book updated 142 files
2 changes: 1 addition & 1 deletion lib/aave-helpers
Submodule aave-helpers updated 162 files
15 changes: 14 additions & 1 deletion scripts/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.0;

import {IPoolAddressesProvider} from '@aave/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';
import {ArbitrumScript, EthereumScript, PolygonScript, AvalancheScript, OptimismScript, BaseScript} from 'aave-helpers/ScriptUtils.sol';
import {ArbitrumScript, EthereumScript, PolygonScript, AvalancheScript, OptimismScript, BaseScript, BNBScript} from 'aave-helpers/ScriptUtils.sol';
import {AaveGovernanceV2} from 'aave-address-book/AaveGovernanceV2.sol';
import {AaveV2Ethereum} from 'aave-address-book/AaveV2Ethereum.sol';
import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';
Expand All @@ -13,6 +13,8 @@ import {AaveV3Avalanche} from 'aave-address-book/AaveV3Avalanche.sol';
import {AaveV3Optimism} from 'aave-address-book/AaveV3Optimism.sol';
import {AaveV3Arbitrum} from 'aave-address-book/AaveV3Arbitrum.sol';
import {AaveV3Base} from 'aave-address-book/AaveV3Base.sol';
import {AaveV3Bnb} from 'aave-address-book/AaveV3Bnb.sol';
import {GovernanceV3BNB} from 'aave-address-book/GovernanceV3BNB.sol';
import {ParaSwapDebtSwapAdapterV3} from '../src/contracts/ParaSwapDebtSwapAdapterV3.sol';
import {ParaSwapDebtSwapAdapterV3GHO} from '../src/contracts/ParaSwapDebtSwapAdapterV3GHO.sol';
import {ParaSwapDebtSwapAdapterV2} from '../src/contracts/ParaSwapDebtSwapAdapterV2.sol';
Expand Down Expand Up @@ -116,3 +118,14 @@ contract BaseV3 is BaseScript {
);
}
}

contract BNBV3 is BNBScript {
function run() external broadcast {
new ParaSwapDebtSwapAdapterV3(
IPoolAddressesProvider(address(AaveV3Bnb.POOL_ADDRESSES_PROVIDER)),
address(AaveV3Bnb.POOL),
AugustusRegistry.BNB,
GovernanceV3BNB.EXECUTOR_LVL_1
);
}
}
2 changes: 1 addition & 1 deletion src/lib/AugustusRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ library AugustusRegistry {
IParaSwapAugustusRegistry public constant OPTIMISM =
IParaSwapAugustusRegistry(0x6e7bE86000dF697facF4396efD2aE2C322165dC3);

IParaSwapAugustusRegistry public constant BSC =
IParaSwapAugustusRegistry public constant BNB =
IParaSwapAugustusRegistry(0x05b4486f643914a818eD93Afc07457e9074be211);

IParaSwapAugustusRegistry public constant BASE =
Expand Down

0 comments on commit 5bb44b2

Please sign in to comment.