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

Skip timestamp check when deadline/expiration is set to maximum amount #247

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

doublespending
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant