OpenZeppelin / OpenZeppelin/openzeppelin-contracts
Make `permit` compatible with smart-contract wallets like Gnosis and Argent
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 27.2k
- Forks
- 12.4k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 33
Description
Motivation
Make the permit method compatible with smart-contract wallets that implement EIP1271, and make smart-contract wallets compatible with dapp flows that leverage the permit method (e.g. via WalletConnect).
Requested change
Replace ECDSA.recover by SignatureChecker. isValidSignatureNow in https://github.com/OpenZeppelin/openzeppelin-contracts/blob/aefcb3e8aa4ee8da8e2b7022ffe4dcb57fbb0fdf/contracts/token/ERC20/extensions/draft-ERC20Permit.sol#L55 .
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with contracts/token/ERC20/extensions/draft-ERC20Permit.sol at the referenced permit implementation and review how EIP1271 validation is exposed through SignatureChecker.isValidSignatureNow. Run the existing ERC20Permit-related tests and confirm that both smart-contract wallets and ordinary EOA signatures are accepted as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100