mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
15 lines
239 B
Solidity
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
|