@bananapus/suckers-v6 0.0.55 → 0.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -271,6 +271,13 @@ library JBSwapPoolLib {
|
|
|
271
271
|
amountOut = uint256(uint128(delta0));
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
+
// Exact-input V4 swaps are encoded with a negative amount.
|
|
275
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
276
|
+
uint256 requestedAmount = uint256(-amountSpecified);
|
|
277
|
+
if (amountIn < requestedAmount) {
|
|
278
|
+
revert JBSwapPoolLib_PartialFill({consumed: amountIn, requested: requestedAmount});
|
|
279
|
+
}
|
|
280
|
+
|
|
274
281
|
// Enforce the minimum output from the TWAP quote.
|
|
275
282
|
if (amountOut < minAmountOut) {
|
|
276
283
|
revert JBSwapPoolLib_SlippageExceeded({amountOut: amountOut, minAmountOut: minAmountOut});
|