With this isValidSignature
function:
// NOTE: This method not safe, contract may attack by signature replay.
/**
* Verify if the signer has a valid signature as claimed
* @param signer The address of user who wants to perform an action
* @param signature The signature signed by the signer
*/
function isValidSignature(address signer, bytes memory signature)
public
view
returns (bool)
{
bytes32 messageHash = keccack256(abi.encodePacked(***byte***(0x19), byte(0), address(this), signer));
return ECDSA.recover(messageHash, signature) == signer;
}
I get linting for byte(0x19)
stating there is an "Expected Primary Expression". Why does this happen?