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?
-
1There's a precompiled contract for that; see here.– goodvibrationOct 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?– PhilogyOct 17, 2020 at 15:49
1 Answer
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