fix: pass permit2 in deployment scripts

- Also deploy PancakeV2 (update in config) on ethereum
This commit is contained in:
TAMARA LIPOWSKI
2025-04-28 17:23:54 -04:00
parent b03c58d833
commit ba19b000dc
3 changed files with 49 additions and 27 deletions

View File

@@ -2,7 +2,7 @@
"ethereum": { "ethereum": {
"uniswap_v2": "0xf6c5be66FFf9DC69962d73da0A617a827c382329", "uniswap_v2": "0xf6c5be66FFf9DC69962d73da0A617a827c382329",
"sushiswap_v2": "0x8ABd4075cF54E0A9C52D18e6951b969AF3249cF9", "sushiswap_v2": "0x8ABd4075cF54E0A9C52D18e6951b969AF3249cF9",
"pancakeswap_v2": "0x9fC9e63cCf5F773A8bC79DcfA38c581B0DEa1d11", "pancakeswap_v2": "0x08B0C001D323da1DC8D2465119BAcCb82c3741f8",
"uniswap_v3": "0xdD8559c917393FC8DD2b4dD289c52Ff445fDE1B0", "uniswap_v3": "0xdD8559c917393FC8DD2b4dD289c52Ff445fDE1B0",
"pancakeswap_v3": "0x4929B619A8F0D9c06ed0FfD497636580D823F65d", "pancakeswap_v3": "0x4929B619A8F0D9c06ed0FfD497636580D823F65d",
"uniswap_v4": "0x042C0ebBEAb9d9987c2f64Ee05f2B3aeB86eAf70", "uniswap_v4": "0x042C0ebBEAb9d9987c2f64Ee05f2B3aeB86eAf70",

View File

@@ -34,7 +34,7 @@ from being stored in the shell history.
## Deploy Tycho Router ## Deploy Tycho Router
For each of the following, you must select one of `tenderly_ethereum`, `tenderly_base`, For each of the following, you must select one of `tenderly_ethereum`, `tenderly_base`,
`ethereum`, or `base` as the network. `ethereum`, `base`, or `unichain` as the network.
1. Deploy router: `npx hardhat run scripts/deploy-router.js --network NETWORK` 1. Deploy router: `npx hardhat run scripts/deploy-router.js --network NETWORK`
2. Define the accounts to grant roles to in `scripts/roles.json` 2. Define the accounts to grant roles to in `scripts/roles.json`

View File

@@ -5,97 +5,113 @@ const hre = require("hardhat");
// Comment out the executors you don't want to deploy // Comment out the executors you don't want to deploy
const executors_to_deploy = { const executors_to_deploy = {
"ethereum": [ "ethereum": [
// USV2 - Args: Factory, Pool Init Code Hash, Fee BPS // USV2 - Args: Factory, Pool Init Code Hash, Permit2, Fee BPS
{ {
exchange: "UniswapV2Executor", args: [ exchange: "UniswapV2Executor", args: [
"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
"0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f", "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f",
"0x000000000022D473030F116dDEE9F6B43aC78BA3"
30 30
] ]
}, },
// SUSHISWAP - Args: Factory, Pool Init Code Hash, Fee BPS, Fee BPS // SUSHISWAP - Args: Factory, Pool Init Code Hash, Fee BPS, Permit2, Fee BPS
{ {
exchange: "UniswapV2Executor", args: [ exchange: "UniswapV2Executor", args: [
"0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac", "0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac",
"0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303", "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",
"0x000000000022D473030F116dDEE9F6B43aC78BA3"
30 30
] ]
}, },
// PANCAKESWAP V2 - Args: Factory, Pool Init Code Hash, Fee BPS // PANCAKESWAP V2 - Args: Factory, Pool Init Code Hash, Permit2, Fee BPS
{ {
exchange: "UniswapV2Executor", args: [ exchange: "UniswapV2Executor", args: [
"0x1097053Fd2ea711dad45caCcc45EfF7548fCB362", "0x1097053Fd2ea711dad45caCcc45EfF7548fCB362",
"0x57224589c67f3f30a6b0d7a1b54cf3153ab84563bc609ef41dfb34f8b2974d2d", "0x57224589c67f3f30a6b0d7a1b54cf3153ab84563bc609ef41dfb34f8b2974d2d",
"0x000000000022D473030F116dDEE9F6B43aC78BA3",
25 25
] ]
}, },
// USV3 -Args: Factory, Pool Init Code Hash // USV3 -Args: Factory, Pool Init Code Hash, Permit2
{ {
exchange: "UniswapV3Executor", args: [ exchange: "UniswapV3Executor", args: [
"0x1F98431c8aD98523631AE4a59f267346ea31F984", "0x1F98431c8aD98523631AE4a59f267346ea31F984",
"0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54" "0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54",
"0x000000000022D473030F116dDEE9F6B43aC78BA3"
] ]
}, },
// PANCAKESWAP V3 - Args: Deployer, Pool Init Code Hash // PANCAKESWAP V3 - Args: Deployer, Pool Init Code Hash, Permit2
{ {
exchange: "UniswapV3Executor", args: [ exchange: "UniswapV3Executor", args: [
"0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9", "0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9",
"0x6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2" "0x6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2"
"0x000000000022D473030F116dDEE9F6B43aC78BA3",
] ]
}, },
// Args: Pool manager // Args: Pool manager
{exchange: "UniswapV4Executor", args: ["0x000000000004444c5dc75cB358380D2e3dE08A90"]}, {exchange: "UniswapV4Executor", args: [
{exchange: "BalancerV2Executor", args: []}, "0x000000000004444c5dc75cB358380D2e3dE08A90",
// Args: Ekubo core contract "0x000000000022D473030F116dDEE9F6B43aC78BA3"
]},
// Args: Permit2
{exchange: "BalancerV2Executor", args: ["0x000000000022D473030F116dDEE9F6B43aC78BA3"]},
// Args: Ekubo core contract, Permit2
{ {
exchange: "EkuboExecutor", args: [ exchange: "EkuboExecutor", args: [
"0xe0e0e08A6A4b9Dc7bD67BCB7aadE5cF48157d444" "0xe0e0e08A6A4b9Dc7bD67BCB7aadE5cF48157d444",
"0x000000000022D473030F116dDEE9F6B43aC78BA3"
] ]
}, },
// Args: ETH address in curve pools // Args: ETH address in curve pools, Permit2
{ {
exchange: "CurveExecutor", args: [ exchange: "CurveExecutor", args: [
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"0x000000000022D473030F116dDEE9F6B43aC78BA3"
] ]
} }
], ],
"base": [ "base": [
// Args: Factory, Pool Init Code Hash, Fee BPS // Args: Factory, Pool Init Code Hash, Permit2, Fee BPS
{ {
exchange: "UniswapV2Executor", args: [ exchange: "UniswapV2Executor", args: [
"0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6", "0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6",
"0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f", "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f",
"0x000000000022D473030F116dDEE9F6B43aC78BA3",
30 30
] ]
}, },
// SUSHISWAP V2 - Args: Factory, Pool Init Code Hash, Fee BPS // SUSHISWAP V2 - Args: Factory, Pool Init Code Hash, Permit2, Fee BPS
{ {
exchange: "UniswapV2Executor", args: [ exchange: "UniswapV2Executor", args: [
"0x71524B4f93c58fcbF659783284E38825f0622859", "0x71524B4f93c58fcbF659783284E38825f0622859",
"0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303", "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",
"0x000000000022D473030F116dDEE9F6B43aC78BA3",
30 30
] ]
}, },
// PANCAKESWAP V2 - Args: Factory, Pool Init Code Hash, Fee BPS // PANCAKESWAP V2 - Args: Factory, Pool Init Code Hash, Permit2, Fee BPS
{ {
exchange: "UniswapV2Executor", args: [ exchange: "UniswapV2Executor", args: [
"0x02a84c1b3BBD7401a5f7fa98a384EBC70bB5749E", "0x1097053Fd2ea711dad45caCcc45EfF7548fCB362",
"0x57224589c67f3f30a6b0d7a1b54cf3153ab84563bc609ef41dfb34f8b2974d2d", "0x57224589c67f3f30a6b0d7a1b54cf3153ab84563bc609ef41dfb34f8b2974d2d",
"0x000000000022D473030F116dDEE9F6B43aC78BA3",
25 25
] ]
}, },
// USV3 - Args: Factory, Pool Init Code Hash // USV3 - Args: Factory, Pool Init Code Hash, Permit2
{ {
exchange: "UniswapV3Executor", args: [ exchange: "UniswapV3Executor", args: [
"0x33128a8fC17869897dcE68Ed026d694621f6FDfD", "0x33128a8fC17869897dcE68Ed026d694621f6FDfD",
"0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54" "0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54",
"0x000000000022D473030F116dDEE9F6B43aC78BA3"
] ]
}, },
// PANCAKESWAP V3 - Args: Deployer, Pool Init Code Hash // PANCAKESWAP V3 - Args: Deployer, Pool Init Code Hash, Permit2
{ {
exchange: "UniswapV3Executor", args: [ exchange: "UniswapV3Executor", args: [
"0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9", "0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9",
"0x6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2" "0x6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2",
"0x000000000022D473030F116dDEE9F6B43aC78BA3"
] ]
}, },
// Args: Pool manager // Args: Pool manager
@@ -103,23 +119,29 @@ const executors_to_deploy = {
{exchange: "BalancerV2Executor", args: []}, {exchange: "BalancerV2Executor", args: []},
], ],
"unichain": [ "unichain": [
// Args: Factory, Pool Init Code Hash, Fee BPS // Args: Factory, Pool Init Code Hash, Permit2, Fee BPS
{ {
exchange: "UniswapV2Executor", args: [ exchange: "UniswapV2Executor", args: [
"0x1f98400000000000000000000000000000000002", "0x1f98400000000000000000000000000000000002",
"0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f", "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f",
"0x000000000022D473030F116dDEE9F6B43aC78BA3",
30 30
] ]
}, },
// USV3 - Args: Factory, Pool Init Code Hash // USV3 - Args: Factory, Pool Init Code Hash, Permit2
{ {
exchange: "UniswapV3Executor", args: [ exchange: "UniswapV3Executor", args: [
"0x1f98400000000000000000000000000000000003", "0x1f98400000000000000000000000000000000003",
"0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54" "0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54",
"0x000000000022D473030F116dDEE9F6B43aC78BA3"
] ]
}, },
// Args: Pool manager // Args: Pool manager, Permit2
{exchange: "UniswapV4Executor", args: ["0x1f98400000000000000000000000000000000004"]}, {exchange: "UniswapV4Executor", args: [
"0x1f98400000000000000000000000000000000004",
"0x000000000022D473030F116dDEE9F6B43aC78BA3"
]
},
], ],
} }