chore: Remove permit2 from executor constructor...
whenever not needed.
This commit is contained in:
@@ -101,19 +101,17 @@ contract TychoRouterTestSetup is Constants, Permit2TestHelper, TestUtils {
|
||||
address ekuboCore = 0xe0e0e08A6A4b9Dc7bD67BCB7aadE5cF48157d444;
|
||||
|
||||
IPoolManager poolManager = IPoolManager(poolManagerAddress);
|
||||
usv2Executor =
|
||||
new UniswapV2Executor(factoryV2, initCodeV2, PERMIT2_ADDRESS, 30);
|
||||
usv2Executor = new UniswapV2Executor(factoryV2, initCodeV2, 30);
|
||||
usv3Executor =
|
||||
new UniswapV3Executor(factoryV3, initCodeV3, PERMIT2_ADDRESS);
|
||||
usv4Executor = new UniswapV4Executor(poolManager, PERMIT2_ADDRESS);
|
||||
pancakev3Executor = new UniswapV3Executor(
|
||||
factoryPancakeV3, initCodePancakeV3, PERMIT2_ADDRESS
|
||||
);
|
||||
balancerv2Executor = new BalancerV2Executor(PERMIT2_ADDRESS);
|
||||
balancerv2Executor = new BalancerV2Executor();
|
||||
ekuboExecutor = new EkuboExecutor(ekuboCore, PERMIT2_ADDRESS);
|
||||
curveExecutor = new CurveExecutor(ETH_ADDR_FOR_CURVE, PERMIT2_ADDRESS);
|
||||
maverickv2Executor =
|
||||
new MaverickV2Executor(MAVERICK_V2_FACTORY, PERMIT2_ADDRESS);
|
||||
curveExecutor = new CurveExecutor(ETH_ADDR_FOR_CURVE);
|
||||
maverickv2Executor = new MaverickV2Executor(MAVERICK_V2_FACTORY);
|
||||
|
||||
address[] memory executors = new address[](8);
|
||||
executors[0] = address(usv2Executor);
|
||||
|
||||
@@ -6,8 +6,6 @@ import "@src/executors/BalancerV2Executor.sol";
|
||||
import {Constants} from "../Constants.sol";
|
||||
|
||||
contract BalancerV2ExecutorExposed is BalancerV2Executor {
|
||||
constructor(address _permit2) BalancerV2Executor(_permit2) {}
|
||||
|
||||
function decodeParams(bytes calldata data)
|
||||
external
|
||||
pure
|
||||
@@ -36,7 +34,7 @@ contract BalancerV2ExecutorTest is Constants, TestUtils {
|
||||
function setUp() public {
|
||||
uint256 forkBlock = 17323404;
|
||||
vm.createSelectFork(vm.rpcUrl("mainnet"), forkBlock);
|
||||
balancerV2Exposed = new BalancerV2ExecutorExposed(PERMIT2_ADDRESS);
|
||||
balancerV2Exposed = new BalancerV2ExecutorExposed();
|
||||
}
|
||||
|
||||
function testDecodeParams() public view {
|
||||
|
||||
@@ -22,9 +22,7 @@ interface MetaRegistry {
|
||||
}
|
||||
|
||||
contract CurveExecutorExposed is CurveExecutor {
|
||||
constructor(address _nativeToken, address _permit2)
|
||||
CurveExecutor(_nativeToken, _permit2)
|
||||
{}
|
||||
constructor(address _nativeToken) CurveExecutor(_nativeToken) {}
|
||||
|
||||
function decodeData(bytes calldata data)
|
||||
external
|
||||
@@ -54,8 +52,7 @@ contract CurveExecutorTest is Test, Constants {
|
||||
function setUp() public {
|
||||
uint256 forkBlock = 22031795;
|
||||
vm.createSelectFork(vm.rpcUrl("mainnet"), forkBlock);
|
||||
curveExecutorExposed =
|
||||
new CurveExecutorExposed(ETH_ADDR_FOR_CURVE, PERMIT2_ADDRESS);
|
||||
curveExecutorExposed = new CurveExecutorExposed(ETH_ADDR_FOR_CURVE);
|
||||
metaRegistry = MetaRegistry(CURVE_META_REGISTRY);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,7 @@ import {Constants} from "../Constants.sol";
|
||||
import "../TestUtils.sol";
|
||||
|
||||
contract MaverickV2ExecutorExposed is MaverickV2Executor {
|
||||
constructor(address _factory, address _permit2)
|
||||
MaverickV2Executor(_factory, _permit2)
|
||||
{}
|
||||
constructor(address _factory) MaverickV2Executor(_factory) {}
|
||||
|
||||
function decodeParams(bytes calldata data)
|
||||
external
|
||||
@@ -34,8 +32,7 @@ contract MaverickV2ExecutorTest is TestUtils, Constants {
|
||||
function setUp() public {
|
||||
uint256 forkBlock = 22096000;
|
||||
vm.createSelectFork(vm.rpcUrl("mainnet"), forkBlock);
|
||||
maverickV2Exposed =
|
||||
new MaverickV2ExecutorExposed(MAVERICK_V2_FACTORY, PERMIT2_ADDRESS);
|
||||
maverickV2Exposed = new MaverickV2ExecutorExposed(MAVERICK_V2_FACTORY);
|
||||
}
|
||||
|
||||
function testDecodeParams() public view {
|
||||
|
||||
@@ -8,12 +8,9 @@ import {Permit2TestHelper} from "../Permit2TestHelper.sol";
|
||||
import {Test} from "../../lib/forge-std/src/Test.sol";
|
||||
|
||||
contract UniswapV2ExecutorExposed is UniswapV2Executor {
|
||||
constructor(
|
||||
address _factory,
|
||||
bytes32 _initCode,
|
||||
address _permit2,
|
||||
uint256 _feeBps
|
||||
) UniswapV2Executor(_factory, _initCode, _permit2, _feeBps) {}
|
||||
constructor(address _factory, bytes32 _initCode, uint256 _feeBps)
|
||||
UniswapV2Executor(_factory, _initCode, _feeBps)
|
||||
{}
|
||||
|
||||
function decodeParams(bytes calldata data)
|
||||
external
|
||||
@@ -65,19 +62,13 @@ contract UniswapV2ExecutorTest is Constants, Permit2TestHelper, TestUtils {
|
||||
uint256 forkBlock = 17323404;
|
||||
vm.createSelectFork(vm.rpcUrl("mainnet"), forkBlock);
|
||||
uniswapV2Exposed = new UniswapV2ExecutorExposed(
|
||||
USV2_FACTORY_ETHEREUM, USV2_POOL_CODE_INIT_HASH, PERMIT2_ADDRESS, 30
|
||||
USV2_FACTORY_ETHEREUM, USV2_POOL_CODE_INIT_HASH, 30
|
||||
);
|
||||
sushiswapV2Exposed = new UniswapV2ExecutorExposed(
|
||||
SUSHISWAPV2_FACTORY_ETHEREUM,
|
||||
SUSHIV2_POOL_CODE_INIT_HASH,
|
||||
PERMIT2_ADDRESS,
|
||||
30
|
||||
SUSHISWAPV2_FACTORY_ETHEREUM, SUSHIV2_POOL_CODE_INIT_HASH, 30
|
||||
);
|
||||
pancakeswapV2Exposed = new UniswapV2ExecutorExposed(
|
||||
PANCAKESWAPV2_FACTORY_ETHEREUM,
|
||||
PANCAKEV2_POOL_CODE_INIT_HASH,
|
||||
PERMIT2_ADDRESS,
|
||||
25
|
||||
PANCAKESWAPV2_FACTORY_ETHEREUM, PANCAKEV2_POOL_CODE_INIT_HASH, 25
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user