1

Why does keccak256() in assembly require 2 arguments? What is the second argument?

assembly {
let foo := keccak256(4)
}

returns error

Function expects 2 arguments but got 1.
mArgo
  • 63
  • 5

1 Answers1

3

If I'm not mistaken, that is a pointer (start) and a length. The syntax differs from Solidity because the latter gets the location as well as the length from the bytes argument.

Hope it helps.

Rob Hitchens
  • 55,151
  • 11
  • 89
  • 145