ECDSAMock.sol 428 B

1234567891011121314151617
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity >=0.6.0 <0.8.0;
  3. import "../cryptography/ECDSA.sol";
  4. contract ECDSAMock {
  5. using ECDSA for bytes32;
  6. function recover(bytes32 hash, bytes memory signature) public pure returns (address) {
  7. return hash.recover(signature);
  8. }
  9. function toEthSignedMessageHash(bytes32 hash) public pure returns (bytes32) {
  10. return hash.toEthSignedMessageHash();
  11. }
  12. }