Skip to content

Comments

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

Open
doublespending wants to merge 1 commit intoUniswap:mainfrom
doublespending:bypass-fetching-timestamp-with-max-deadline
Open

Skip timestamp check when deadline/expiration is set to maximum amount#247
doublespending wants to merge 1 commit intoUniswap:mainfrom
doublespending:bypass-fetching-timestamp-with-max-deadline

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