Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools for ERC1271 signature verification #2535

Closed
Amxx opened this issue Feb 24, 2021 · 2 comments · Fixed by #2532
Closed

Tools for ERC1271 signature verification #2535

Amxx opened this issue Feb 24, 2021 · 2 comments · Fixed by #2532
Labels
contracts Smart contract code. feature New contracts, functions, or helpers.

Comments

@Amxx
Copy link
Collaborator

Amxx commented Feb 24, 2021

🧐 Motivation
Smart wallet are becoming more and more common. Recovery of signature is supported by contracts through the ECDSA library, but this only works for EOA. Smart Wallet rely on ERC1271 to perform signature verification, but this is not currently support by openzeppelin/contracts

📝 Details
Add a SignatureChecker library, that given an expected signer (address), a hash (bytes32) and a signature (bytes), will transparently support traditional EOA signature, or resolve to ERC1271 if the expected signer is a smart contract.

@Amxx Amxx added feature New contracts, functions, or helpers. contracts Smart contract code. labels Feb 24, 2021
@heyJonBray
Copy link

Pretty straightforward, and good to stay ahead of the curve with smart wallets. I was in the process of working on a similar feature for a lightweight auth/signature library
Will update if this is something I will do.
Cheers!

@frangio
Copy link
Contributor

frangio commented Mar 16, 2021

@heyJonBray Please note that there is an open PR already implementing this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contracts Smart contract code. feature New contracts, functions, or helpers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants