Closed saucepoint closed 2 months ago
upon additional reading from https://github.com/Uniswap/permit2/pull/51 and https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2852
we do not need to check address(this) == _CACHED_THIS
in DOMAIN_SEPARATOR
1) it saves 36 gas
2) it breaks ERC721Permit tokens looking to delegatecall posm. we dont expect the community to tap into posm for its ERC721Permit implementation. and if they do, they're bad devs 👿
Related Issue
Replace OZ EIP712.sol with our own because UR uses OZ v4.7 and cannot find the import
Description of changes
Took Permit2's EIP712.sol:
_HASHED_NAME
into an immutableAdded checks for _CACHED_THIS == address(this) (mirrors OZ's behavior)removed since its a delegate protection, see comment below_HASHED_VERSION
to DOMAIN_SEPARATOR (mirrors OZ's behavior)RYO cryptography at 10pm on a friday, what could possibly go wrong 🤷