Before Solidity v0.5, keccak256() took multiple arguments, and after v0.5 it requires a single bytes argument. Which of the two encoding types, encode/encodePacked, did the compiler use?
Solidity – Which Was Standard in Solidity Compiler Before Solidity 0.5: abi.encodePacked or abi.encode?
byteskeccaksolidity
Related Topic
- Solidity Update – Why call() Function Stopped Working in Version 0.5.0
- Fixing Invalid Implicit Conversion Errors from uint256 to bytes in Solidity
- [Ethereum] Why are there two methods encoding arguments? “abi.encode” and “abi.encodePacked”
- [Ethereum] When to use abi.encode, abi.encodePacked or abi.encodeWithSignature in solidity
- Solidity Assembly – How to Decode a Nested encodePacked
Best Answer
It was
abi.encodePacked()
.keccak256(abi.encodePacked(a, b, c))
on 0.5+ is equivalent tokeccak256(a, b, c)
in earlier versions.Solidity v0.5.0 Breaking Changes > Semantic and Syntactic Changes