Uniswap / v4-periphery

🦄 🦄 🦄 🦄 Peripheral smart contracts for interacting with Uniswap v4
https://blog.uniswap.org/uniswap-v4
GNU General Public License v2.0
707 stars 483 forks source link

Replace OZ EIP712 #256

Closed saucepoint closed 2 months ago

saucepoint commented 2 months ago

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:


RYO cryptography at 10pm on a friday, what could possibly go wrong 🤷

saucepoint commented 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 👿