Closed s1241 closed 6 years ago
Such problems are usually caused by not setting the EVM version of the runtime to the latest version (byzantium) - especially if it works in some environments but not in all. Could you please check that? Thanks!
Closed due to inactivity. Please reopen if the issue persists of if you have more questions.
Issue
When I want to verify the
Ethereum ECDSA
signature bySolidity
contract that has been generated usingethereumjs
I receive : “VM Exception while processing transaction: revert”. Whereas I can verify this signature by JavaScript code andethereumjs
successfully.The entire code is presented HERE
Steps to Reproduce
I tested signature verification of the code presented HERE as follows:
running
testRPC
:And I chose the following addresses as
signer / sender
andrecipient
:Getting
contract balance
:Signing :
signPayment('0xa6D8893aAF5121AEfb496aB305e0DA42F71aAaa5', 50, function(err, something) {}); //signature= 0xb6dec803b061504e22bccccffdfe26980ddaa33d650268361bec5ef4bd4a863f6ff2ee7d524f63cd82ef5634a063cd5e21f164c2ab1a6c952131308d6f46fb1200
Verifying :
result = isValidSignature('0xa6D8893aAF5121AEfb496aB305e0DA42F71aAaa5', 50, "0xb6dec803b061504e22bccccffdfe26980ddaa33d650268361bec5ef4bd4a863f6ff2ee7d524f63cd82ef5634a063cd5e21f164c2ab1a6c952131308d6f46fb1200", "0xa1fe30d3b82fd7c563b6fc9c44f3990bfcef3ed4"); console.log("Signature Verification Result= ", result); //result = true
eth_sendTransaction
Note 1: When I remove
signature
fromfunction close
as follows, transferringether
is done, since when I getcontract balance
it becomeszero
. However, with signature I receive the above error message.Note 2:
Meanwhile I added a new function as follow to get value of
message
in :by which I can get value of
recoverSigner(message, signature)
:So I defined following function and deployed contract again :
function returnMsg(uint256 amount) public
And when I get transaction status "contract address is "null" : "