2019-08-07 17:21:32 +00:00
|
|
|
contract C {
|
2019-08-19 12:54:31 +00:00
|
|
|
function e() public pure {
|
2019-08-07 17:21:32 +00:00
|
|
|
revert("Transaction failed.");
|
|
|
|
}
|
2019-08-19 12:54:31 +00:00
|
|
|
function f(bool _value) public pure {
|
|
|
|
string memory message;
|
|
|
|
require(_value, message);
|
|
|
|
}
|
|
|
|
function g(bool _value) public pure {
|
|
|
|
require(_value, "Value is false.");
|
|
|
|
}
|
2019-09-09 20:46:43 +00:00
|
|
|
function h() public pure returns (uint) {
|
|
|
|
assert(false);
|
|
|
|
}
|
2019-08-07 17:21:32 +00:00
|
|
|
}
|
|
|
|
// ====
|
2020-05-04 21:04:03 +00:00
|
|
|
// compileViaYul: also
|
2019-08-07 17:21:32 +00:00
|
|
|
// EVMVersion: >homestead
|
2020-05-04 21:04:03 +00:00
|
|
|
// allowNonExistingFunctions: true
|
2019-08-07 17:21:32 +00:00
|
|
|
// ----
|
|
|
|
// _() -> FAILURE
|
|
|
|
// e() -> FAILURE, hex"08c379a0", 0x20, 19, "Transaction failed."
|
2019-08-19 12:54:31 +00:00
|
|
|
// f(bool): false -> FAILURE, hex"08c379a0", 0x20, 0
|
|
|
|
// g(bool): false -> FAILURE, hex"08c379a0", 0x20, 15, "Value is false."
|
2020-05-04 21:04:03 +00:00
|
|
|
// h() -> FAILURE
|