Skip to main content

Overview

EIP-712 is a standard for signing typed structured data. It provides a secure way to sign complex data structures that are human-readable and verifiable on-chain.

Prerequisites

Sign Typed Data

Common EIP-712 Structures

Basic Message

ERC-20 Permit

NFT Transfer Authorization

Meta-Transaction

SwiftUI Example

Use Cases

Gasless Transactions

EIP-712 signatures enable gasless transactions where a relayer pays the gas:

Token Approvals Without Gas

Off-Chain Order Books

Best Practices

1. Validate Domain

Always include and validate the domain parameters:

2. Include Nonces

Prevent replay attacks by including nonces:

3. Set Deadlines

Always include expiration timestamps:

4. Handle Errors

EIP-712 Structure

The typed data must follow this structure:

Next Steps

Last modified on February 2, 2026