solidity/test/libsolidity/smtCheckerTests/external_calls/call_with_value_1.sol
2021-11-24 20:41:22 +01:00

17 lines
695 B
Solidity

contract C {
function g(address payable i) public {
require(address(this).balance == 100);
i.call{value: 10}("");
assert(address(this).balance == 90); // should hold
assert(address(this).balance == 100); // should fail
}
}
// ====
// SMTEngine: all
// SMTIgnoreOS: macos
// ----
// Warning 9302: (96-117): Return value of low-level calls not used.
// Warning 6328: (121-156): CHC: Assertion violation might happen here.
// Warning 6328: (175-211): CHC: Assertion violation happens here.\nCounterexample:\n\ni = 0x0\n\nTransaction trace:\nC.constructor()\nC.g(0x0)\n i.call{value: 10}("") -- untrusted external call
// Warning 4661: (121-156): BMC: Assertion violation happens here.