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
|
|
|
}
|
|
|
|
// ====
|
|
|
|
// EVMVersion: >homestead
|
2020-05-04 21:04:03 +00:00
|
|
|
// allowNonExistingFunctions: true
|
2021-03-12 23:02:36 +00:00
|
|
|
// compileToEwasm: also
|
2020-10-13 11:28:39 +00:00
|
|
|
// compileViaYul: also
|
2019-08-07 17:21:32 +00:00
|
|
|
// ----
|
|
|
|
// _() -> FAILURE
|
2020-10-13 11:28:39 +00:00
|
|
|
// e() -> FAILURE, hex"08c379a0", 0x20, 0x13, "Transaction failed."
|
|
|
|
// f(bool): false -> FAILURE, hex"08c379a0", 0x20, 0x00
|
|
|
|
// g(bool): false -> FAILURE, hex"08c379a0", 0x20, 0x0f, "Value is false."
|
|
|
|
// h() -> FAILURE, hex"4e487b71", 0x01
|