# ERC-1271: Standard Signature Validation for Contracts

Source: https://www.eipsfordesigners.com/standards/ERC-1271
Agent brief: https://www.eipsfordesigners.com/standards/ERC-1271/agent.md
Machine-readable JSON: https://www.eipsfordesigners.com/api/standards/ERC-1271
Last reviewed: 2026-04-05
Last updated: 2026-04-05

| Field | Value |
| --- | --- |
| Status | Final |
| Chain | both |
| Category | Security & Trust |
| Journey stages | Authentication & Identity |
| Detailed guide | Yes |
| Official specification | https://eips.ethereum.org/EIPS/eip-1271 |
| Discussion search | https://ethereum-magicians.org/search?q=ERC-1271 |

## UX Impact

Smart contract wallets (Safe, Argent) can sign messages like EOAs — unlocks gasless listings, off-chain voting for multisigs. Design implications: don't assume signer = EOA, show 'Wallet Type: Smart Contract' indicator, support signature verification loading states. Design decisions: how to handle async signature verification vs instant EOA checks — may need pending/confirming states in UI.

## Summary

ERC-1271 lets smart contract wallets (like multisigs and account abstraction wallets) sign messages just like regular wallets. This enables "Login with Smart Wallet" and signature-based permissions for users who don't have traditional seed phrase wallets.

## For Designers

- You can design UI that delivers any contract can implement isValidSignature() to verify signatures.
- You can design UI that delivers multisigs implement ERC-1271 to validate collected signatures.
- You can design UI that delivers contracts check ERC-1271 for smart wallet signatures.

## Applicability

### When to Use

- Your product addresses: smart wallets can't sign messages for login.
- Your product addresses: multisig users locked out of dApps.
- The flow should deliver: any contract can implement isValidSignature() to verify signatures.
- Connect flows must list wallets with names, icons, and explicit user choice.

### When to Avoid

- Always check for contract code and support ERC-1271 verification.
- Check EOA first, then fall back to isValidSignature() for contracts.
- Display how many signatures collected vs required.
- Wrong-address or approval mistakes are not recoverable in your product context.

## Problems It Solves

### Smart wallets can't sign messages for login

Impact: critical

Old way: Only EOAs (seed phrase wallets) could sign messages, excluding smart wallet users

New way: Any contract can implement isValidSignature() to verify signatures

### Multisig users locked out of dApps

Impact: critical

Old way: Gnosis Safe users couldn't use "Sign-In with Ethereum" or permit

New way: Multisigs implement ERC-1271 to validate collected signatures

### Permit/gasless approvals don't work for smart wallets

Impact: high

Old way: ERC-2612 permit only worked with EOA ECDSA signatures

New way: Contracts check ERC-1271 for smart wallet signatures

### Off-chain order signing excludes smart wallet users

Impact: high

Old way: OpenSea, 0x orders required EOA signatures, excluding multisigs

New way: Marketplaces verify signatures via isValidSignature()

### Each smart wallet has different signature validation

Impact: medium

Old way: Every multisig had its own signature scheme, apps couldn't support all

New way: Standard interface means one integration works for all smart wallets

## Anti-Patterns

### Assuming all wallets are EOAs

Severity: critical

Smart wallet users get "invalid signature" errors and can't use your app

Instead: Always check for contract code and support ERC-1271 verification

### Only using ecrecover for signature validation

Severity: critical

Excludes multisigs, Argent, Safe, and all ERC-4337 wallets

Instead: Check EOA first, then fall back to isValidSignature() for contracts

### Not showing multisig signature progress

Severity: high

Users don't know if their request is pending or failed

Instead: Display how many signatures collected vs required

### Hiding wallet type from users

Severity: high

Smart wallet users don't know why signing flow is different

Instead: Show "Multisig detected" and explain the multi-signer flow

### Short signature timeouts for multisigs

Severity: medium

Multisigs need time to collect signatures from multiple parties

Instead: Allow longer validity periods or refreshable signatures

### Not providing reminder/notification for pending signatures

Severity: medium

Signatures stall because other signers don't know they're needed

Instead: Integrate with Safe notification API or provide reminder button

## UI Components

### WalletTypeIndicator

Show whether connected wallet is EOA or smart wallet
States: eoa, smart-wallet, multisig, unknown
Props: walletAddress, walletType, walletName, threshold

### SignatureProgress

Track multisig signature collection
States: pending, partial, complete, expired
Props: collected, required, signers[], deadline

### SmartWalletBadge

Indicate smart wallet compatibility
States: compatible, incompatible, checking
Props: walletType, supportedFeatures[]

### SignerList

List multisig signers and their status
States: waiting, signed, rejected
Props: signers[], signedBy[], requiredCount

### UniversalSignButton

Sign button that adapts to wallet type
States: ready, awaiting-signatures, complete, error
Props: message, walletType, onSign, signaturesNeeded

## On Monad

### Signature Verification Speed

Ethereum: isValidSignature() call can be slow (RPC latency)

Monad: Sub-second RPC responses make verification feel instant

Design implication: Can verify signatures inline without loading states

### Gas for Verification

Ethereum: On-chain verification in contracts costs significant gas

Monad: Lower gas costs make on-chain verification more viable

Design implication: Can do on-chain signature checks in transaction flow

### Smart Wallet Adoption

Ethereum: Smart wallets common for treasuries, less for consumers

Monad: EIP-7702 makes smart wallet features common on regular EOAs

Design implication: More users will have contract code, always check 1271

### Multisig Confirmation

Ethereum: Waiting for block confirmations adds latency

Monad: Fast finality means signature status updates nearly instantly

Design implication: Real-time signature progress without polling delays

## Key Takeaways

- ERC-1271 = smart wallets can sign messages
- Always support both ecrecover AND isValidSignature()
- Check if address has code to detect smart wallets
- Show multisig progress: "2 of 3 signatures collected"
- Allow longer timeouts for multi-party signing

## UX Patterns

### Smart Wallet Login

Sign-in flow that works for both EOAs and smart wallets

User flow:

- User connects smart wallet
- App detects contract wallet (no code at EOA = EOA, code = smart wallet)
- Shows appropriate signing flow (single vs multisig)
- User initiates signature request
- Other signers approve if needed
- App verifies via isValidSignature()
- User logged in

Mockup registry key: `concept/siwe-sign-in` (React UI on the live standard page).

### Multisig Signature Progress

Track signature collection for multisig operations

User flow:

- Signature request created
- First signer signs
- Progress updates in real-time
- Second signer notified
- Threshold reached
- Signature validated, action proceeds

Mockup registry key: `concept/siwe-sign-in` (React UI on the live standard page).

### Gasless Listing (Permit + 1271)

Create marketplace listings without gas for smart wallet users

User flow:

- User fills listing details
- App checks wallet type
- Gasless option available for all wallet types
- User signs listing order
- Smart wallet validates via 1271
- Listing goes live without gas spent

Mockup registry key: `concept/permit-approval` (React UI on the live standard page).

### Universal Signature Verification

Detect wallet type and verify appropriately

User flow:

- App receives signature from unknown wallet
- Check if address has code (smart wallet) or not (EOA)
- For EOA: use ecrecover
- For smart wallet: call isValidSignature()
- Check return value equals magic value
- Display verification result

Mockup registry key: `concept/verify-safety` (React UI on the live standard page).

## Technical Notes

ERC-1271 defines a single function: isValidSignature(bytes32 hash, bytes signature) returns (bytes4). If valid, returns magic value 0x1626ba7e. To check if address is smart wallet: if (address.code.length > 0) use 1271, else use ecrecover. Most smart wallets (Safe, Argent, Sequence, etc.) implement this standard.
