RevokeCash / revoke.cash

❌ Revoke or update your token approvals
https://revoke.cash
MIT License
674 stars 238 forks source link

How to determine whether a contract is connected to permit #127

Closed opensourcex123 closed 1 year ago

opensourcex123 commented 1 year ago

I saw in the code for revoke that it was determined whether there was a DOMAIN_ SEPARATOR is a function, but I have seen some token contract codes that do not have this function. So how does this determine whether to connect to permit?

image
rkalis commented 1 year ago

Sorry for missing this issue. We have this check that we use to see if a token has support for Permit. Basically we check that the functions that are required for the EIP2612 standard are implemented. It's not watertight, but at least we know that if these functions are not implemented (correctly) the token does not support Permit.

CleanShot 2023-08-06 at 09 47 04@2x