Written by Pablo Gómez
Founder & CEO at Metlabs · Reviewed on October 11, 2026
EIP-712 defines how the domain separator a contract uses to verify typed-data signatures is built, but it provided no on-chain way for a third party to read it. ERC-5267 (Retrieval of EIP-712 domain), created by Francisco Giordano of OpenZeppelin on 14 July 2022 and now Final, fills that gap with a single view function: eip712Domain(), which returns the fields bitmap, the name, version, chainId, verifyingContract and salt values, and an extensions list for future fields.
The flow is direct. The application calls eip712Domain(), reads the bitmap (bit 0 name, bit 1 version, bit 2 chainId, bit 3 verifyingContract, bit 4 salt), rebuilds the domain using only the flagged fields, computes the separator and signs data the contract will accept. A contract can emit the optional EIP712DomainChanged() event so clients invalidate their cache. This avoids hardcoding name or version, the most common cause of signatures that silently fail verification.
EIP-712 signatures become self-discoverable and interoperable, and wallets and libraries build correct signatures without external documentation. The cost is effectively zero since it is a view function. OpenZeppelin Contracts has implemented eip712Domain() natively since v4.9 (May 2023), so any contract inheriting from EIP712, such as permits or votes, becomes compliant. viem exposes it through the getEip712Domain action, and the eip712domains tool uses it to retrieve domains.
Also known as
- ERC5267
- Retrieval of EIP-712 domain





