Skip to content

Commit caba61b

Browse files
supercontractslucas-manuel
authored andcommitted
fix: check amount for permit2 C13
1 parent 3fe3072 commit caba61b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libraries/UniswapV4Lib.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ library UniswapV4Lib {
254254
)
255255
internal
256256
{
257+
require(amount <= type(uint160).max, "MC/amount-too-large-for-permit2");
258+
257259
// Approve the Permit2 contract to spend none of the token (success is optional).
258260
// NOTE: We don't care about the success of this call, since the only outcomes are:
259261
// - the allowance is 0 (it was reset or was already 0)

0 commit comments

Comments
 (0)