permit2
permit2 copied to clipboard
Possible improvement Permit2Lib.sol:permit2
I think it could be better instead of check the DOMAIN_SEPARATOR which some tokens that implement permit do not implement like UNI.
Check instead the PERMIT_TYPEHASH in a very similar behaviour.
In this way you can support native permit to the tokens that do not support DOMAIN_SEPARATOR like UNI ( so overall will be more optimal) and also support other DAI like tokens that support permit, that you see in this list