Files
openzeppelin-contracts/contracts/mocks/ECDSAMock.sol
Hadrien Croubois 24a0bc23cf Reorganize the repo structure (#2503)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
2021-02-22 16:44:16 +00:00

18 lines
426 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/cryptography/ECDSA.sol";
contract ECDSAMock {
using ECDSA for bytes32;
function recover(bytes32 hash, bytes memory signature) public pure returns (address) {
return hash.recover(signature);
}
function toEthSignedMessageHash(bytes32 hash) public pure returns (bytes32) {
return hash.toEthSignedMessageHash();
}
}