Created
January 8, 2019 13:26
-
-
Save sickworm/43054a88f16c0dcfb64dfa60bf4f31d2 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.2+commit.1df8f40c.js&optimize=false&gist=
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.5.2; | |
contract test { | |
function verify(bytes32 _message, uint8 _v, bytes32 _r, bytes32 _s) view public returns (address) { | |
// e.g. | |
// 0xFC6661E6206B81F1B20F5A02990D44D7CE8981DB5B6CD9FA1EA6BD40BA413F91 | |
// 27 | |
// 0x296D9D5411245812DC2D787A5CA5B615C44227B0263B8882F3C1ACDF64AF9AF9 | |
// 0x25573E5163614790C7F71517C1B0EFEBDD81DE54DF483D1455E534F49958C875 | |
address signer = ecrecover(_message, _v, _r, _s); | |
return signer; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment