|
@@ -2581,12 +2581,9 @@ See {recover}.
|
|
|
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
|
|
|
```
|
|
|
|
|
|
-Signature verification helper: Provide a single mechanism to verify both private-key (EOA) ECDSA signature and
|
|
|
-ERC1271 contract signatures. Using this instead of ECDSA.recover in your contract will make them compatible with
|
|
|
-smart contract wallets such as Argent and Gnosis.
|
|
|
-
|
|
|
-Note: unlike ECDSA signatures, contract signature's are revocable, and the outcome of this function can thus change
|
|
|
-through time. It could return true at block N and false at block N+1 (or the opposite).
|
|
|
+Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA
|
|
|
+signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like
|
|
|
+Argent and Gnosis Safe.
|
|
|
|
|
|
_Available since v4.1._
|
|
|
|
|
@@ -2604,7 +2601,11 @@ _Available since v4.1._
|
|
|
[[SignatureChecker-isValidSignatureNow-address-bytes32-bytes-]]
|
|
|
==== `[.contract-item-name]#++isValidSignatureNow++#++(address signer, bytes32 hash, bytes signature) → bool++` [.item-kind]#internal#
|
|
|
|
|
|
+Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the
|
|
|
+signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.
|
|
|
|
|
|
+NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
|
|
|
+change through time. It could return true at block N and false at block N+1 (or the opposite).
|
|
|
|
|
|
|
|
|
|