0

How does ecrecover() in solidity work? Looking at ethervm.io there doesn't seem to be an opcode for ecrecover? To what bytes is a ecrecover() call compiled?

2
  • 1
    There's a precompiled contract for that; see here. Oct 17, 2020 at 15:35
  • Ah ok, ethereum has so many free bytes that they could use to build in those opcodes, why don't they?
    – Philogy
    Oct 17, 2020 at 15:49

1 Answer 1

0

Pre-compiled contracts do not have an opcode but are rather run by making a message call to a particular address.

Ecrecover is a pre-compiled contract that is pointed at the address 0x0000000000000000000000000000000000000001

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.