fix: make USV2 factory configurable in Executor
- This factory is not the same for Ethereum and Base, so Base txs were failing when verifying pool addresses. - I've double checked that we don't have this problem for Balancer V2 - the vault address in the same on Base and on Ethereum Mainnet.
This commit is contained in:
@@ -3,12 +3,21 @@ const {ethers} = require("hardhat");
|
||||
const hre = require("hardhat");
|
||||
|
||||
// Comment out the executors you don't want to deploy
|
||||
const executors_to_deploy = [
|
||||
{exchange: "UniswapV2Executor", args: []},
|
||||
const executors_to_deploy = {
|
||||
"ethereum":[
|
||||
{exchange: "UniswapV2Executor", args: ["0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"]},
|
||||
{exchange: "UniswapV3Executor", args: ["0x1F98431c8aD98523631AE4a59f267346ea31F984"]},
|
||||
{exchange: "UniswapV4Executor", args: ["0x000000000004444c5dc75cB358380D2e3dE08A90"]},
|
||||
{exchange: "BalancerV2Executor", args: []},
|
||||
]
|
||||
],
|
||||
"base":[
|
||||
{exchange: "UniswapV2Executor", args: ["0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6"]},
|
||||
{exchange: "UniswapV3Executor", args: ["0x33128a8fC17869897dcE68Ed026d694621f6FDfD"]},
|
||||
{exchange: "UniswapV4Executor", args: ["0x498581ff718922c3f8e6a244956af099b2652b2b"]},
|
||||
{exchange: "BalancerV2Executor", args: []},
|
||||
],
|
||||
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const network = hre.network.name;
|
||||
@@ -18,7 +27,7 @@ async function main() {
|
||||
console.log(`Deploying with account: ${deployer.address}`);
|
||||
console.log(`Account balance: ${ethers.utils.formatEther(await deployer.getBalance())} ETH`);
|
||||
|
||||
for (const executor of executors_to_deploy) {
|
||||
for (const executor of executors_to_deploy[network]) {
|
||||
const {exchange, args} = executor;
|
||||
const Executor = await ethers.getContractFactory(exchange);
|
||||
const deployedExecutor = await Executor.deploy(...args);
|
||||
|
||||
Reference in New Issue
Block a user