@@ -103,70 +103,6 @@ contract EulerSwapFactoryTest is EulerSwapTestBase {
103
103
vm.prank (holder);
104
104
vm.expectRevert (EulerSwapFactory.OldOperatorStillInstalled.selector );
105
105
evc.batch (items);
106
-
107
- // test deploying new pool for same assets pair as old one
108
- address oldPool = eulerSwapFactory.poolByEulerAccount (holder);
109
- salt = bytes32 (uint256 (123456 ));
110
- predictedAddress = predictPoolAddress (address (eulerSwapFactory), poolParams, curveParams, salt);
111
-
112
- items = new IEVC.BatchItem [](3 );
113
- items[0 ] = IEVC.BatchItem ({
114
- onBehalfOfAccount: address (0 ),
115
- targetContract: address (evc),
116
- value: 0 ,
117
- data: abi.encodeCall (evc.setAccountOperator, (holder, oldPool, false ))
118
- });
119
- items[1 ] = IEVC.BatchItem ({
120
- onBehalfOfAccount: address (0 ),
121
- targetContract: address (evc),
122
- value: 0 ,
123
- data: abi.encodeCall (evc.setAccountOperator, (holder, predictedAddress, true ))
124
- });
125
- items[2 ] = IEVC.BatchItem ({
126
- onBehalfOfAccount: holder,
127
- targetContract: address (eulerSwapFactory),
128
- value: 0 ,
129
- data: abi.encodeCall (EulerSwapFactory.deployPool, (poolParams, curveParams, salt))
130
- });
131
-
132
- vm.prank (holder);
133
- evc.batch (items);
134
-
135
- address pool = eulerSwapFactory.poolByEulerAccount (holder);
136
- assertEq (pool, predictedAddress);
137
-
138
- // test deploying new pool for different assets pair as old one
139
- oldPool = eulerSwapFactory.poolByEulerAccount (holder);
140
- poolParams = IEulerSwap.Params (address (eTST), address (eTST3), holder, 1e18 , 1e18 , 1e18 , 1e18 , 0 );
141
-
142
- salt = bytes32 (uint256 (1234567 ));
143
- predictedAddress = predictPoolAddress (address (eulerSwapFactory), poolParams, curveParams, salt);
144
-
145
- items = new IEVC.BatchItem [](3 );
146
- items[0 ] = IEVC.BatchItem ({
147
- onBehalfOfAccount: address (0 ),
148
- targetContract: address (evc),
149
- value: 0 ,
150
- data: abi.encodeCall (evc.setAccountOperator, (holder, oldPool, false ))
151
- });
152
- items[1 ] = IEVC.BatchItem ({
153
- onBehalfOfAccount: address (0 ),
154
- targetContract: address (evc),
155
- value: 0 ,
156
- data: abi.encodeCall (evc.setAccountOperator, (holder, predictedAddress, true ))
157
- });
158
- items[2 ] = IEVC.BatchItem ({
159
- onBehalfOfAccount: holder,
160
- targetContract: address (eulerSwapFactory),
161
- value: 0 ,
162
- data: abi.encodeCall (EulerSwapFactory.deployPool, (poolParams, curveParams, salt))
163
- });
164
-
165
- vm.prank (holder);
166
- evc.batch (items);
167
-
168
- pool = eulerSwapFactory.poolByEulerAccount (holder);
169
- assertEq (pool, predictedAddress);
170
106
}
171
107
172
108
function testInvalidPoolsSliceOutOfBounds () public {
0 commit comments