In order for Permit2 to comply with ERC-4337 validation rules and support account abstraction, certain commonly used operations such as checking the current timestamp cannot be run in function calls.
When permit2 is called with a deadline/expiration with the maximum value possible, this PR interprets that as having no expiry, so the timestamp check is skipped and the operation is compliant with ERC-4337.
For example, this can make user using permit2 to prefund paymaster possible in ERC-4337 validation.
Similar approach has been applied by the permit of USDC.
In order for Permit2 to comply with ERC-4337 validation rules and support account abstraction, certain commonly used operations such as checking the current timestamp cannot be run in function calls.
When permit2 is called with a deadline/expiration with the maximum value possible, this PR interprets that as having no expiry, so the timestamp check is skipped and the operation is compliant with ERC-4337.
For example, this can make user using permit2 to prefund paymaster possible in ERC-4337 validation.
Similar approach has been applied by the
permit
of USDC.