AbstractSigner.sol 891 B

12345678910111213141516171819202122
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.20;
  3. /**
  4. * @dev Abstract contract for signature validation.
  5. *
  6. * Developers must implement {_rawSignatureValidation} and use it as the lowest-level signature validation mechanism.
  7. *
  8. * @custom:stateless
  9. */
  10. abstract contract AbstractSigner {
  11. /**
  12. * @dev Signature validation algorithm.
  13. *
  14. * WARNING: Implementing a signature validation algorithm is a security-sensitive operation as it involves
  15. * cryptographic verification. It is important to review and test thoroughly before deployment. Consider
  16. * using one of the signature verification libraries (xref:api:utils/cryptography#ECDSA[ECDSA],
  17. * xref:api:utils/cryptography#P256[P256] or xref:api:utils/cryptography#RSA[RSA]).
  18. */
  19. function _rawSignatureValidation(bytes32 hash, bytes calldata signature) internal view virtual returns (bool);
  20. }