@@ -43,11 +43,6 @@ contract CowEvcOpenPositionWrapper is CowWrapper, PreApprovedHashes {
4343
4444 string public constant name = "Euler EVC - Open Position " ;
4545
46- /// @notice Tracks the number of times this wrapper has been called
47- uint256 public transient depth;
48- /// @notice Tracks the number of times `evcInternalSettle` has been called
49- uint256 public transient settleCalls;
50-
5146 uint256 public immutable nonceNamespace;
5247
5348 error Unauthorized (address msgSender );
@@ -162,8 +157,6 @@ contract CowEvcOpenPositionWrapper is CowWrapper, PreApprovedHashes {
162157 /// @param settleData Data which will be used for the parameters in a call to `CowSettlement.settle`
163158 /// @param wrapperData Additional data containing OpenPositionParams
164159 function _wrap (bytes calldata settleData , bytes calldata wrapperData , bytes calldata remainingWrapperData ) internal override {
165- depth = depth + 1 ;
166-
167160 // Decode wrapper data into OpenPositionParams
168161 OpenPositionParams memory params;
169162 bytes memory signature;
@@ -272,11 +265,6 @@ contract CowEvcOpenPositionWrapper is CowWrapper, PreApprovedHashes {
272265 function evcInternalSettle (bytes calldata settleData , bytes calldata remainingWrapperData ) external payable {
273266 require (msg .sender == address (EVC), Unauthorized (msg .sender ));
274267
275- // depth should be > 0 (actively wrapping a settle call) and no settle call should have been performed yet
276- require (depth > 0 && settleCalls == 0 , Unauthorized (address (0 )));
277-
278- settleCalls = settleCalls + 1 ;
279-
280268 // Use GPv2Wrapper's _internalSettle to call the settlement contract
281269 // wrapperData is empty since we've already processed it in _wrap
282270 _internalSettle (settleData, remainingWrapperData);
0 commit comments