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
|
|
|
|
// ----
|
|
|
|
// _() -> 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."
|
2019-09-09 20:46:43 +00:00
|
|
|
// h() -> FAILURE
|