Skip to content

Commit

Permalink
fix: Resolve conflicts agains BGD upstream remote main chain (#15)
Browse files Browse the repository at this point in the history
* chore: bnb deploy script (#25)

* fix: resolve conflicts
  • Loading branch information
miguelmtzinf authored Mar 8, 2024
1 parent cb77b7f commit 820705a
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 5 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-helpers
Submodule aave-helpers updated 162 files
2 changes: 2 additions & 0 deletions src/contracts/dependencies/paraswap/AugustusRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ library AugustusRegistry {

address public constant BSC = 0x05b4486f643914a818eD93Afc07457e9074be211;

address public constant BNB = 0x05b4486f643914a818eD93Afc07457e9074be211;

address public constant BASE = 0x7E31B336F9E8bA52ba3c4ac861b033Ba90900bb3;
}
16 changes: 15 additions & 1 deletion src/script/Deploy_ParaSwapDebtSwapAdapter.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -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
);
}
}

15 changes: 14 additions & 1 deletion src/script/Deploy_ParaSwapLiquiditySwapAdapter.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -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
);
}
}
15 changes: 14 additions & 1 deletion src/script/Deploy_ParaSwapRepayAdapter.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -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
);
}
}
15 changes: 14 additions & 1 deletion src/script/Deploy_ParaSwapWithdrawAdapter.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -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
);
}
}

0 comments on commit 820705a

Please sign in to comment.