circlefin/stablecoin-evm

Add ERC-5267 `eip712Domain()` for retrieval of EIP-712 domain

Opened this issue · 0 comments

Circle tokens use EIP-712 signatures, but only have a DOMAIN_SEPARATOR() getter. This getter is not enough for applications to request EIP-712 signatures from users because the full domain parameters are required. The only available solution is for applications to hardcode known domain objects, which significantly limits adoption of EIP-712, and can become a problem if Circle tokens ever need to update their domain.

ERC-5267 defines a standard eip712Domain() function for contracts to publish their domain parameters so that applications can retrieve them. Please consider adding this function to Circle tokens.

For reference here is OpenZeppelin's implementation: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/utils/cryptography/EIP712.sol#L114-L137