@@ -16,28 +16,30 @@ contract Swap is ScriptUtils {
1616 string memory json = getScriptFile (inputScriptFileName);
1717 address uniswapRouterV2 = vm.parseJsonAddress (json, ".uniswapRouterV2 " );
1818 address uniswapRouterV3 = vm.parseJsonAddress (json, ".uniswapRouterV3 " );
19+ address evc = vm.parseJsonAddress (json, ".evc " );
20+ address permit2 = vm.parseJsonAddress (json, ".permit2 " );
1921
20- (swapper, swapVerifier) = execute (uniswapRouterV2, uniswapRouterV3);
22+ (swapper, swapVerifier) = execute (evc, permit2, uniswapRouterV2, uniswapRouterV3);
2123
2224 string memory object;
2325 object = vm.serializeAddress ("swap " , "swapper " , swapper);
2426 object = vm.serializeAddress ("swap " , "swapVerifier " , swapVerifier);
2527 vm.writeJson (object, string .concat (vm.projectRoot (), "/script/ " , outputScriptFileName));
2628 }
2729
28- function deploy (address uniswapRouterV2 , address uniswapRouterV3 )
30+ function deploy (address evc , address permit2 , address uniswapRouterV2 , address uniswapRouterV3 )
2931 public
3032 broadcast
3133 returns (address swapper , address swapVerifier )
3234 {
33- (swapper, swapVerifier) = execute (uniswapRouterV2, uniswapRouterV3);
35+ (swapper, swapVerifier) = execute (evc, permit2, uniswapRouterV2, uniswapRouterV3);
3436 }
3537
36- function execute (address uniswapRouterV2 , address uniswapRouterV3 )
38+ function execute (address evc , address permit2 , address uniswapRouterV2 , address uniswapRouterV3 )
3739 public
3840 returns (address swapper , address swapVerifier )
3941 {
4042 swapper = address (new Swapper (uniswapRouterV2, uniswapRouterV3));
41- swapVerifier = address (new SwapVerifier ());
43+ swapVerifier = address (new SwapVerifier (evc, permit2 ));
4244 }
4345}
0 commit comments