fix: Read Tycho Router addresses from file
--- don't change below this line --- ENG-4675 Took 17 minutes
This commit is contained in:
@@ -1,28 +1,29 @@
|
|||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
const {ethers} = require("hardhat");
|
const {ethers} = require("hardhat");
|
||||||
const hre = require("hardhat");
|
const hre = require("hardhat");
|
||||||
|
const path = require("path");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const network = hre.network.name;
|
const network = hre.network.name;
|
||||||
let tychoRouter;
|
|
||||||
let uniswapXReactor;
|
let uniswapXReactor;
|
||||||
let nativeToken;
|
let nativeToken;
|
||||||
if (network === "ethereum") {
|
if (network === "ethereum") {
|
||||||
tychoRouter = "0xfD0b31d2E955fA55e3fa641Fe90e08b677188d35";
|
|
||||||
uniswapXReactor = "0x00000011F84B9aa48e5f8aA8B9897600006289Be";
|
uniswapXReactor = "0x00000011F84B9aa48e5f8aA8B9897600006289Be";
|
||||||
nativeToken = "0x0000000000000000000000000000000000000000";
|
nativeToken = "0x0000000000000000000000000000000000000000";
|
||||||
} else if (network === "base") {
|
} else if (network === "base") {
|
||||||
tychoRouter = "0xea3207778e39EB02D72C9D3c4Eac7E224ac5d369";
|
|
||||||
uniswapXReactor = "0x000000001Ec5656dcdB24D90DFa42742738De729";
|
uniswapXReactor = "0x000000001Ec5656dcdB24D90DFa42742738De729";
|
||||||
nativeToken = "0x0000000000000000000000000000000000000000";
|
nativeToken = "0x0000000000000000000000000000000000000000";
|
||||||
} else if (network === "unichain") {
|
} else if (network === "unichain") {
|
||||||
tychoRouter = "0xFfA5ec2e444e4285108e4a17b82dA495c178427B";
|
|
||||||
uniswapXReactor = "0x00000006021a6Bce796be7ba509BBBA71e956e37";
|
uniswapXReactor = "0x00000006021a6Bce796be7ba509BBBA71e956e37";
|
||||||
nativeToken = "0x0000000000000000000000000000000000000000";
|
nativeToken = "0x0000000000000000000000000000000000000000";
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Unsupported network: ${network}`);
|
throw new Error(`Unsupported network: ${network}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const routerAddressesFilePath = path.join(__dirname, "../../config/router_addresses.json");
|
||||||
|
const tychoRouter = JSON.parse(fs.readFileSync(routerAddressesFilePath, "utf8"))[network];
|
||||||
|
|
||||||
console.log(`Deploying Uniswap X filler to ${network} with:`);
|
console.log(`Deploying Uniswap X filler to ${network} with:`);
|
||||||
console.log(`- Tycho router: ${tychoRouter}`);
|
console.log(`- Tycho router: ${tychoRouter}`);
|
||||||
console.log(`- Uniswap X reactor: ${uniswapXReactor}`);
|
console.log(`- Uniswap X reactor: ${uniswapXReactor}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user