feat: Deploy to mainnet. Update all addresses
--- don't change below this line --- ENG-4260 Took 27 minutes Took 10 seconds
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"ethereum": {
|
"ethereum": {
|
||||||
"uniswap_v2": "0x00C1b81e3C8f6347E69e2DDb90454798A6Be975E",
|
"uniswap_v2": "0xE6424D3d95A5D86e2b6cB3E1d77B9391816265DD",
|
||||||
"uniswap_v3": "0xF744EBfaA580cF3fFc25aD046E92BD8B770a0700",
|
"uniswap_v3": "0xdba8d9142e98ebd30608e65d685f01826b2ae6a4",
|
||||||
"uniswap_v4": "0x90BE4620436354c9DfA58614B3Bdd5a80FBfAF31",
|
"uniswap_v4": "0xE183caC244f44D1922BDcE041e960Db3979860BB",
|
||||||
"vm:balancer_v2": "0xffe5B139b396c9A3d5d9ab89AAE78bF3070CbD64"
|
"vm:balancer_v2": "0xF99eE7695db4f5fc181A3EE3bC7333E8a0312335"
|
||||||
},
|
},
|
||||||
"tenderly_ethereum": {
|
"tenderly_ethereum": {
|
||||||
"uniswap_v2": "0x00C1b81e3C8f6347E69e2DDb90454798A6Be975E",
|
"uniswap_v2": "0x00C1b81e3C8f6347E69e2DDb90454798A6Be975E",
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ async function main() {
|
|||||||
try {
|
try {
|
||||||
await hre.tenderly.verify({
|
await hre.tenderly.verify({
|
||||||
name: exchange,
|
name: exchange,
|
||||||
address: address,
|
address: deployedExecutor.address,
|
||||||
});
|
});
|
||||||
console.log("Contract verified successfully on Tenderly");
|
console.log("Contract verified successfully on Tenderly");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -41,7 +41,7 @@ async function main() {
|
|||||||
// Verify on Etherscan
|
// Verify on Etherscan
|
||||||
try {
|
try {
|
||||||
await hre.run("verify:verify", {
|
await hre.run("verify:verify", {
|
||||||
address: address,
|
address: deployedExecutor.address,
|
||||||
constructorArguments: args,
|
constructorArguments: args,
|
||||||
});
|
});
|
||||||
console.log(`${exchange} verified successfully on Etherscan!`);
|
console.log(`${exchange} verified successfully on Etherscan!`);
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ async function main() {
|
|||||||
const network = hre.network.name;
|
const network = hre.network.name;
|
||||||
let permit2;
|
let permit2;
|
||||||
let weth;
|
let weth;
|
||||||
if (network === "mainnet" || network === "tenderly_mainnet") {
|
if (network === "ethereum" || network === "tenderly_ethereum") {
|
||||||
permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
||||||
weth = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
|
weth = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
|
||||||
} else if (network === "base" || network === "tenderly_base") {
|
} else if (network === "base" || network === "tenderly_base") {
|
||||||
// permit2 address is the same as on mainnet
|
// permit2 address is the same as on ethereum
|
||||||
permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
||||||
weth = "0x4200000000000000000000000000000000000006";
|
weth = "0x4200000000000000000000000000000000000006";
|
||||||
} else {
|
} else {
|
||||||
@@ -20,14 +20,13 @@ async function main() {
|
|||||||
console.log(`Deploying TychoRouter to ${network} with:`);
|
console.log(`Deploying TychoRouter to ${network} with:`);
|
||||||
console.log(`- permit2: ${permit2}`);
|
console.log(`- permit2: ${permit2}`);
|
||||||
console.log(`- weth: ${weth}`);
|
console.log(`- weth: ${weth}`);
|
||||||
const args = [permit2, weth];
|
|
||||||
|
|
||||||
const [deployer] = await ethers.getSigners();
|
const [deployer] = await ethers.getSigners();
|
||||||
console.log(`Deploying with account: ${deployer.address}`);
|
console.log(`Deploying with account: ${deployer.address}`);
|
||||||
console.log(`Account balance: ${ethers.utils.formatEther(await deployer.getBalance())} ETH`);
|
console.log(`Account balance: ${ethers.utils.formatEther(await deployer.getBalance())} ETH`);
|
||||||
|
|
||||||
const TychoRouter = await ethers.getContractFactory("TychoRouter");
|
const TychoRouter = await ethers.getContractFactory("TychoRouter");
|
||||||
const router = await TychoRouter.deploy(args);
|
const router = await TychoRouter.deploy(permit2, weth);
|
||||||
|
|
||||||
await router.deployed();
|
await router.deployed();
|
||||||
console.log(`TychoRouter deployed to: ${router.address}`);
|
console.log(`TychoRouter deployed to: ${router.address}`);
|
||||||
@@ -51,7 +50,7 @@ async function main() {
|
|||||||
try {
|
try {
|
||||||
await hre.run("verify:verify", {
|
await hre.run("verify:verify", {
|
||||||
address: router.address,
|
address: router.address,
|
||||||
constructorArguments: args,
|
constructorArguments: [permit2, weth],
|
||||||
});
|
});
|
||||||
console.log(`TychoRouter verified successfully on Etherscan!`);
|
console.log(`TychoRouter verified successfully on Etherscan!`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -400,7 +400,7 @@ mod tests {
|
|||||||
let hex_protocol_data = encode(&protocol_data);
|
let hex_protocol_data = encode(&protocol_data);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
executor_address,
|
executor_address,
|
||||||
Bytes::from_str("0x00C1b81e3C8f6347E69e2DDb90454798A6Be975E").unwrap()
|
Bytes::from_str("0xE6424D3d95A5D86e2b6cB3E1d77B9391816265DD").unwrap()
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
hex_protocol_data,
|
hex_protocol_data,
|
||||||
@@ -525,7 +525,7 @@ mod tests {
|
|||||||
let hex_protocol_data = encode(&protocol_data);
|
let hex_protocol_data = encode(&protocol_data);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
executor_address,
|
executor_address,
|
||||||
Bytes::from_str("0x90BE4620436354c9DfA58614B3Bdd5a80FBfAF31").unwrap()
|
Bytes::from_str("0xE183caC244f44D1922BDcE041e960Db3979860BB").unwrap()
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
hex_protocol_data,
|
hex_protocol_data,
|
||||||
@@ -537,7 +537,7 @@ mod tests {
|
|||||||
// zero for one
|
// zero for one
|
||||||
"00",
|
"00",
|
||||||
// executor address
|
// executor address
|
||||||
"90be4620436354c9dfa58614b3bdd5a80fbfaf31",
|
"e183cac244f44d1922bdce041e960db3979860bb",
|
||||||
// first pool intermediary token (ETH)
|
// first pool intermediary token (ETH)
|
||||||
"0000000000000000000000000000000000000000",
|
"0000000000000000000000000000000000000000",
|
||||||
// fee
|
// fee
|
||||||
@@ -669,7 +669,7 @@ mod tests {
|
|||||||
"01", // token out index
|
"01", // token out index
|
||||||
"000000", // split
|
"000000", // split
|
||||||
// Swap data
|
// Swap data
|
||||||
"00c1b81e3c8f6347e69e2ddb90454798a6be975e", // executor address
|
"e6424d3d95a5d86e2b6cb3e1d77b9391816265dd", // executor address
|
||||||
"c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", // token in
|
"c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", // token in
|
||||||
"a478c2975ab1ea89e8196811f51a7b7ade33eb11", // component id
|
"a478c2975ab1ea89e8196811f51a7b7ade33eb11", // component id
|
||||||
"3ede3eca2a72b3aecc820e955b36f38437d01395", // receiver
|
"3ede3eca2a72b3aecc820e955b36f38437d01395", // receiver
|
||||||
@@ -990,12 +990,12 @@ mod tests {
|
|||||||
"01", // token out index
|
"01", // token out index
|
||||||
"000000", // split
|
"000000", // split
|
||||||
// Swap data header
|
// Swap data header
|
||||||
"90be4620436354c9dfa58614b3bdd5a80fbfaf31", // executor address
|
"e183cac244f44d1922bdce041e960db3979860bb", // executor address
|
||||||
// Protocol data
|
// Protocol data
|
||||||
"a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", // group token in
|
"a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", // group token in
|
||||||
"6982508145454ce325ddbe47a25d4ec3d2311933", // group token in
|
"6982508145454ce325ddbe47a25d4ec3d2311933", // group token in
|
||||||
"00", // zero2one
|
"00", // zero2one
|
||||||
"90be4620436354c9dfa58614b3bdd5a80fbfaf31", // executor address
|
"e183cac244f44d1922bdce041e960db3979860bb", // executor address
|
||||||
// First pool params
|
// First pool params
|
||||||
"0000000000000000000000000000000000000000", // intermediary token (ETH)
|
"0000000000000000000000000000000000000000", // intermediary token (ETH)
|
||||||
"000bb8", // fee
|
"000bb8", // fee
|
||||||
@@ -1076,7 +1076,7 @@ mod tests {
|
|||||||
"01", // token out index
|
"01", // token out index
|
||||||
"000000", // split
|
"000000", // split
|
||||||
// Swap data
|
// Swap data
|
||||||
"00c1b81e3c8f6347e69e2ddb90454798a6be975e", // executor address
|
"e6424d3d95a5d86e2b6cb3e1d77b9391816265dd", // executor address
|
||||||
"c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", // token in
|
"c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", // token in
|
||||||
"a478c2975ab1ea89e8196811f51a7b7ade33eb11", // component id
|
"a478c2975ab1ea89e8196811f51a7b7ade33eb11", // component id
|
||||||
"3ede3eca2a72b3aecc820e955b36f38437d01395", // receiver
|
"3ede3eca2a72b3aecc820e955b36f38437d01395", // receiver
|
||||||
|
|||||||
Reference in New Issue
Block a user