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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user