feat: support base deployment

gas limit had to be set when setting executors on base: kept getting UNPREDICTABLE_GAS_LIMIT error. It should definitely not cost more than 100000 gas to set limit... but this may be a problem on other chains in the future.
This commit is contained in:
TAMARA LIPOWSKI
2025-02-25 16:31:11 -05:00
parent 22c48e80d2
commit 7ca9120b7b
7 changed files with 66 additions and 29 deletions

View File

@@ -4,8 +4,18 @@ const hre = require("hardhat");
async function main() {
const network = hre.network.name;
const permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
const weth = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
let permit2;
let weth;
if (network === "mainnet" || network === "tenderly_mainnet") {
permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
weth = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
} else if (network === "base" || network === "tenderly_base") {
// permit2 address is the same as on mainnet
permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
weth = "0x4200000000000000000000000000000000000006";
} else {
throw new Error(`Unsupported network: ${network}`);
}
console.log(`Deploying TychoRouter to ${network} with:`);
console.log(`- permit2: ${permit2}`);