Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove userData from bufferWrapOrUnwrap struct #1022

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pkg/interfaces/contracts/vault/VaultTypes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,13 @@ enum WrappingDirection {
* @param amountGivenRaw Amount specified for tokenIn or tokenOut (depends on the type of swap and wrapping direction)
* @param limitRaw Minimum or maximum amount specified for the other token (depends on the type of swap and wrapping
* direction)
* @param userData Optional user data
*/
struct BufferWrapOrUnwrapParams {
SwapKind kind;
WrappingDirection direction;
IERC4626 wrappedToken;
uint256 amountGivenRaw;
uint256 limitRaw;
bytes userData;
}

// Protocol Fees are 24-bit values. We transform them by multiplying by 1e11, so
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
304.6k
301.9k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
248.2k
245.5k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
343.3k
340.7k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
269.5k
266.9k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
214.2k
214.1k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
181.5k
181.4k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
236.4k
236.3k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
235.7k
235.6k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
228.7k
228.6k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
230.8k
230.9k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
210.7k
210.6k
4 changes: 2 additions & 2 deletions pkg/pool-weighted/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ evm_version = 'cancun'
ignored_error_codes = [2394, 5574, 3860] # Transient storage, code size

[fuzz]
runs = 10000
runs = 100
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related, or left over from something else?

max_test_rejects = 60000

[profile.forkfuzz.fuzz]
runs = 1000
runs = 100
max_test_rejects = 60000

[profile.coverage.fuzz]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
299.5k
296.8k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
234.7k
232.0k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
329.9k
327.2k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
256.1k
253.5k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
230.2k
230.1k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
218.4k
218.3k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
184.2k
184.1k
6 changes: 2 additions & 4 deletions pkg/vault/contracts/BatchRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ contract BatchRouter is IBatchRouter, BatchRouterCommon, ReentrancyGuardTransien
: WrappingDirection.WRAP,
wrappedToken: IERC4626(step.pool),
amountGivenRaw: stepExactAmountIn,
limitRaw: minAmountOut,
userData: params.userData
limitRaw: minAmountOut
})
);

Expand Down Expand Up @@ -449,8 +448,7 @@ contract BatchRouter is IBatchRouter, BatchRouterCommon, ReentrancyGuardTransien
: WrappingDirection.WRAP,
wrappedToken: IERC4626(step.pool),
amountGivenRaw: stepExactAmountOut,
limitRaw: stepMaxAmountIn,
userData: params.userData
limitRaw: stepMaxAmountIn
})
);

Expand Down
6 changes: 2 additions & 4 deletions pkg/vault/contracts/CompositeLiquidityRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,7 @@ contract CompositeLiquidityRouter is ICompositeLiquidityRouter, BatchRouterCommo
direction: WrappingDirection.UNWRAP,
wrappedToken: wrappedToken,
amountGivenRaw: wrappedAmountsOut[i],
limitRaw: params.minAmountsOut[i],
userData: params.userData
limitRaw: params.minAmountsOut[i]
})
);

Expand Down Expand Up @@ -360,8 +359,7 @@ contract CompositeLiquidityRouter is ICompositeLiquidityRouter, BatchRouterCommo
direction: WrappingDirection.WRAP,
wrappedToken: wrappedToken,
amountGivenRaw: amountsIn[i],
limitRaw: limits[i],
userData: params.userData
limitRaw: limits[i]
})
);

Expand Down
4 changes: 2 additions & 2 deletions pkg/vault/test/.contract-sizes/BatchRouter
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Bytecode 16.785
InitCode 18.245
Bytecode 16.818
InitCode 18.306
4 changes: 2 additions & 2 deletions pkg/vault/test/.contract-sizes/CompositeLiquidityRouter
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Bytecode 23.774
InitCode 25.313
Bytecode 23.557
InitCode 25.096
4 changes: 2 additions & 2 deletions pkg/vault/test/.contract-sizes/Vault
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Bytecode 23.066
InitCode 24.407
Bytecode 23.006
InitCode 24.347
6 changes: 2 additions & 4 deletions pkg/vault/test/foundry/BufferDoSProtection.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ contract BufferDoSProtectionTest is BaseVaultTest {
direction: WrappingDirection.WRAP,
wrappedToken: IERC4626(address(waDAI)),
amountGivenRaw: amountGivenRaw,
limitRaw: limitRaw,
userData: bytes("")
limitRaw: limitRaw
}),
lp,
frontrunnerUnderlyingAmount
Expand Down Expand Up @@ -137,8 +136,7 @@ contract BufferDoSProtectionTest is BaseVaultTest {
direction: WrappingDirection.UNWRAP,
wrappedToken: IERC4626(address(waDAI)),
amountGivenRaw: amountGivenRaw,
limitRaw: limitRaw,
userData: bytes("")
limitRaw: limitRaw
}),
lp,
frontrunnerWrappedAmount
Expand Down
6 changes: 2 additions & 4 deletions pkg/vault/test/foundry/BufferVaultPrimitive.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,7 @@ contract BufferVaultPrimitiveTest is BaseVaultTest {
direction: WrappingDirection.WRAP,
wrappedToken: IERC4626(address(waDAI)),
amountGivenRaw: vaultBalance,
limitRaw: 0,
userData: bytes("")
limitRaw: 0
})
)
);
Expand Down Expand Up @@ -387,8 +386,7 @@ contract BufferVaultPrimitiveTest is BaseVaultTest {
direction: WrappingDirection.WRAP,
wrappedToken: IERC4626(address(waDAI)),
amountGivenRaw: PRODUCTION_MIN_WRAP_AMOUNT,
limitRaw: MAX_UINT128,
userData: bytes("")
limitRaw: MAX_UINT128
})
)
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
291.1k
288.4k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
234.7k
232.0k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
321.4k
318.8k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
256.0k
253.4k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
191.6k
191.5k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
217.0k
216.9k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
179.3k
179.4k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
175.1k
175.0k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
169.0k
169.1k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
151.9k
152.0k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
238.5k
238.4k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
309.5k
306.9k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
248.3k
245.6k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
343.7k
341.0k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
269.9k
267.3k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
219.3k
219.2k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
242.7k
242.6k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
233.9k
233.8k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
199.7k
199.6k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
232.8k
232.9k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
343.4k
343.5k
Original file line number Diff line number Diff line change
@@ -1 +1 @@
330.9k
331.0k
Loading