solidity/test/libsolidity/semanticTests/builtinFunctions/keccak256_with_bytes.sol
2022-05-19 20:23:28 +02:00

15 lines
239 B
Solidity

contract c {
bytes data;
function foo() public returns (bool) {
data.push("f");
data.push("o");
data.push("o");
return keccak256(data) == keccak256("foo");
}
}
// ====
// ----
// foo() -> true