New answers tagged

1

Thanks to Cameel's answer I realized that I could just test myself in Remix using compiler older than v0.5. I did so, because I wanted to verify the answer, and it was correct. Since this approach is good for other noobs to use, I post it here as an answer. Solidity version has to be one that has included the abi.encode/encodePacked methods (added in v0.4.24)...


1

It was abi.encodePacked(). keccak256(abi.encodePacked(a, b, c)) on 0.5+ is equivalent to keccak256(a, b, c) in earlier versions. Solidity v0.5.0 Breaking Changes > Semantic and Syntactic Changes The functions .call(), .delegatecall(), staticcall(), keccak256(), sha256() and ripemd160() now accept only a single bytes argument. Moreover, the argument is ...


Top 50 recent answers are included