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.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityWhy 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.
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.