Just concatenating strings doesn't work.
Keccak::hash(10 . $address, 256) is what I'm doing atm.
Just concatenating strings doesn't work.
Keccak::hash(10 . $address, 256) is what I'm doing atm.
Actually you can concatinate strings simply as shown in the question (that's what abi.encodePacked is doing).
However, my problem was with numbers.
This is because solidity's sha3 function hashes its inputs based on the
argument types. Thus the value 1 will generate a different hash if it is
stored as bytes8, bytes16, bytes32, etc. Since sha3(1) is being passed 1 as a
number literal, it is converted into the smallest necessary type, uint81.