feat: Support Pancakeswap v3 on ethereum

- Needed to take pool code init hash as input param for executors
- Added tests for ethereum. Will test base on-chain.
- Important note: Pancakeswap uses their deployer instead of their factory (this is a different address) for target verification.
This commit is contained in:
TAMARA LIPOWSKI
2025-03-19 15:30:58 -04:00
parent 0a8a34be03
commit 2a4ee88cad
7 changed files with 78 additions and 28 deletions

View File

@@ -44,9 +44,10 @@ contract TychoRouterTestSetup is Test, Constants {
vm.createSelectFork(vm.rpcUrl("mainnet"), forkBlock);
vm.startPrank(ADMIN);
address factoryV3 = USV3_FACTORY_ETHEREUM;
address factoryV2 = USV2_FACTORY_ETHEREUM;
address factoryV3 = USV3_FACTORY_ETHEREUM;
bytes32 initCodeV2 = USV2_POOL_CODE_INIT_HASH;
bytes32 initCodeV3 = USV3_POOL_CODE_INIT_HASH;
address poolManagerAddress = 0x000000000004444c5dc75cB358380D2e3dE08A90;
IPoolManager poolManager = IPoolManager(poolManagerAddress);
tychoRouter = new TychoRouterExposed(PERMIT2_ADDRESS, WETH_ADDR);
@@ -62,7 +63,7 @@ contract TychoRouterTestSetup is Test, Constants {
vm.stopPrank();
usv2Executor = new UniswapV2Executor(factoryV2, initCodeV2);
usv3Executor = new UniswapV3Executor(factoryV3);
usv3Executor = new UniswapV3Executor(factoryV3, initCodeV3);
usv4Executor = new UniswapV4Executor(poolManager);
vm.startPrank(EXECUTOR_SETTER);
address[] memory executors = new address[](3);