diff --git a/Makefile b/Makefile index 44247e7..5cae5a1 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/foundry.toml b/foundry.toml index 6aa64f1..f42d481 100644 --- a/foundry.toml +++ b/foundry.toml @@ -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} @@ -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 diff --git a/lib/aave-helpers b/lib/aave-helpers index dc6e80f..428dc96 160000 --- a/lib/aave-helpers +++ b/lib/aave-helpers @@ -1 +1 @@ -Subproject commit dc6e80ffafd43565376ba63cff43659e6fc249d4 +Subproject commit 428dc96fb23d5858e3c5ecb6bd5e24d236613efc diff --git a/src/contracts/dependencies/paraswap/AugustusRegistry.sol b/src/contracts/dependencies/paraswap/AugustusRegistry.sol index 10b1136..a84b190 100644 --- a/src/contracts/dependencies/paraswap/AugustusRegistry.sol +++ b/src/contracts/dependencies/paraswap/AugustusRegistry.sol @@ -14,5 +14,7 @@ library AugustusRegistry { address public constant BSC = 0x05b4486f643914a818eD93Afc07457e9074be211; + address public constant BNB = 0x05b4486f643914a818eD93Afc07457e9074be211; + address public constant BASE = 0x7E31B336F9E8bA52ba3c4ac861b033Ba90900bb3; } diff --git a/src/script/Deploy_ParaSwapDebtSwapAdapter.s.sol b/src/script/Deploy_ParaSwapDebtSwapAdapter.s.sol index f0b63db..2bd8415 100644 --- a/src/script/Deploy_ParaSwapDebtSwapAdapter.s.sol +++ b/src/script/Deploy_ParaSwapDebtSwapAdapter.s.sol @@ -2,13 +2,14 @@ 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 {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; import {GovernanceV3Polygon} from 'aave-address-book/GovernanceV3Polygon.sol'; import {GovernanceV3Avalanche} from 'aave-address-book/GovernanceV3Avalanche.sol'; import {GovernanceV3Arbitrum} from 'aave-address-book/GovernanceV3Arbitrum.sol'; import {GovernanceV3Optimism} from 'aave-address-book/GovernanceV3Optimism.sol'; import {GovernanceV3Base} from 'aave-address-book/GovernanceV3Base.sol'; +import {GovernanceV3BNB} from 'aave-address-book/GovernanceV3BNB.sol'; import {AaveV2Ethereum} from 'aave-address-book/AaveV2Ethereum.sol'; import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol'; import {AaveV2Polygon} from 'aave-address-book/AaveV2Polygon.sol'; @@ -18,6 +19,7 @@ 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 {ParaSwapDebtSwapAdapterV3} from 'src/contracts/ParaSwapDebtSwapAdapterV3.sol'; import {ParaSwapDebtSwapAdapterV3GHO} from 'src/contracts/ParaSwapDebtSwapAdapterV3GHO.sol'; import {ParaSwapDebtSwapAdapterV2} from 'src/contracts/ParaSwapDebtSwapAdapterV2.sol'; @@ -122,3 +124,15 @@ contract BaseV3 is BaseScript { ); } } + +contract BNBV3 is BNBScript { + function run() external broadcast { + new ParaSwapDebtSwapAdapterV3( + IPoolAddressesProvider(address(AaveV3BNB.POOL_ADDRESSES_PROVIDER)), + address(AaveV3BNB.POOL), + IParaSwapAugustusRegistry(AugustusRegistry.BNB), + GovernanceV3BNB.EXECUTOR_LVL_1 + ); + } +} + diff --git a/src/script/Deploy_ParaSwapLiquiditySwapAdapter.s.sol b/src/script/Deploy_ParaSwapLiquiditySwapAdapter.s.sol index b682e15..c984862 100644 --- a/src/script/Deploy_ParaSwapLiquiditySwapAdapter.s.sol +++ b/src/script/Deploy_ParaSwapLiquiditySwapAdapter.s.sol @@ -2,13 +2,14 @@ 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 {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; import {GovernanceV3Polygon} from 'aave-address-book/GovernanceV3Polygon.sol'; import {GovernanceV3Avalanche} from 'aave-address-book/GovernanceV3Avalanche.sol'; import {GovernanceV3Arbitrum} from 'aave-address-book/GovernanceV3Arbitrum.sol'; import {GovernanceV3Optimism} from 'aave-address-book/GovernanceV3Optimism.sol'; import {GovernanceV3Base} from 'aave-address-book/GovernanceV3Base.sol'; +import {GovernanceV3BNB} from 'aave-address-book/GovernanceV3BNB.sol'; import {AaveV2Ethereum} from 'aave-address-book/AaveV2Ethereum.sol'; import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol'; import {AaveV2Polygon} from 'aave-address-book/AaveV2Polygon.sol'; @@ -18,6 +19,7 @@ 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 {ParaSwapLiquiditySwapAdapterV2} from 'src/contracts/ParaSwapLiquiditySwapAdapterV2.sol'; import {ParaSwapLiquiditySwapAdapterV3} from 'src/contracts/ParaSwapLiquiditySwapAdapterV3.sol'; import {IParaSwapAugustusRegistry} from 'src/contracts/dependencies/paraswap/IParaSwapAugustusRegistry.sol'; @@ -121,3 +123,14 @@ contract BaseV3 is BaseScript { ); } } + +contract BNBV3 is BNBScript { + function run() external broadcast { + new ParaSwapLiquiditySwapAdapterV3( + IPoolAddressesProvider(address(AaveV3BNB.POOL_ADDRESSES_PROVIDER)), + address(AaveV3BNB.POOL), + IParaSwapAugustusRegistry(AugustusRegistry.BNB), + GovernanceV3BNB.EXECUTOR_LVL_1 + ); + } +} diff --git a/src/script/Deploy_ParaSwapRepayAdapter.s.sol b/src/script/Deploy_ParaSwapRepayAdapter.s.sol index 791b3f3..0a2b12f 100644 --- a/src/script/Deploy_ParaSwapRepayAdapter.s.sol +++ b/src/script/Deploy_ParaSwapRepayAdapter.s.sol @@ -2,13 +2,14 @@ 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 {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; import {GovernanceV3Polygon} from 'aave-address-book/GovernanceV3Polygon.sol'; import {GovernanceV3Avalanche} from 'aave-address-book/GovernanceV3Avalanche.sol'; import {GovernanceV3Arbitrum} from 'aave-address-book/GovernanceV3Arbitrum.sol'; import {GovernanceV3Optimism} from 'aave-address-book/GovernanceV3Optimism.sol'; import {GovernanceV3Base} from 'aave-address-book/GovernanceV3Base.sol'; +import {GovernanceV3BNB} from 'aave-address-book/GovernanceV3BNB.sol'; import {AaveV2Ethereum} from 'aave-address-book/AaveV2Ethereum.sol'; import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol'; import {AaveV2Polygon} from 'aave-address-book/AaveV2Polygon.sol'; @@ -18,6 +19,7 @@ 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 {ParaSwapRepayAdapterV2} from 'src/contracts/ParaSwapRepayAdapterV2.sol'; import {ParaSwapRepayAdapterV3} from 'src/contracts/ParaSwapRepayAdapterV3.sol'; import {IParaSwapAugustusRegistry} from 'src/contracts/dependencies/paraswap/IParaSwapAugustusRegistry.sol'; @@ -121,3 +123,14 @@ contract BaseV3 is BaseScript { ); } } + +contract BNBV3 is BNBScript { + function run() external broadcast { + new ParaSwapRepayAdapterV3( + IPoolAddressesProvider(address(AaveV3BNB.POOL_ADDRESSES_PROVIDER)), + address(AaveV3BNB.POOL), + IParaSwapAugustusRegistry(AugustusRegistry.BNB), + GovernanceV3BNB.EXECUTOR_LVL_1 + ); + } +} \ No newline at end of file diff --git a/src/script/Deploy_ParaSwapWithdrawAdapter.s.sol b/src/script/Deploy_ParaSwapWithdrawAdapter.s.sol index 2ef1c48..0e69467 100644 --- a/src/script/Deploy_ParaSwapWithdrawAdapter.s.sol +++ b/src/script/Deploy_ParaSwapWithdrawAdapter.s.sol @@ -2,13 +2,14 @@ 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 {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; import {GovernanceV3Polygon} from 'aave-address-book/GovernanceV3Polygon.sol'; import {GovernanceV3Avalanche} from 'aave-address-book/GovernanceV3Avalanche.sol'; import {GovernanceV3Arbitrum} from 'aave-address-book/GovernanceV3Arbitrum.sol'; import {GovernanceV3Optimism} from 'aave-address-book/GovernanceV3Optimism.sol'; import {GovernanceV3Base} from 'aave-address-book/GovernanceV3Base.sol'; +import {GovernanceV3BNB} from 'aave-address-book/GovernanceV3BNB.sol'; import {AaveV2Ethereum} from 'aave-address-book/AaveV2Ethereum.sol'; import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol'; import {AaveV2Polygon} from 'aave-address-book/AaveV2Polygon.sol'; @@ -18,6 +19,7 @@ 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 {ParaSwapWithdrawSwapAdapterV2} from 'src/contracts/ParaSwapWithdrawSwapAdapterV2.sol'; import {ParaSwapWithdrawSwapAdapterV3} from 'src/contracts/ParaSwapWithdrawSwapAdapterV3.sol'; import {IParaSwapAugustusRegistry} from 'src/contracts/dependencies/paraswap/IParaSwapAugustusRegistry.sol'; @@ -121,3 +123,14 @@ contract BaseV3 is BaseScript { ); } } + +contract BNBV3 is BNBScript { + function run() external broadcast { + new ParaSwapWithdrawSwapAdapterV3( + IPoolAddressesProvider(address(AaveV3BNB.POOL_ADDRESSES_PROVIDER)), + address(AaveV3BNB.POOL), + IParaSwapAugustusRegistry(AugustusRegistry.BNB), + GovernanceV3BNB.EXECUTOR_LVL_1 + ); + } +}