solidity/test/libsolidity/smtCheckerTests/special/many.sol

31 lines
1.2 KiB
Solidity
Raw Normal View History

contract C
{
function f() public payable {
assert(msg.sender == block.coinbase);
assert(block.difficulty == block.gaslimit);
assert(block.prevrandao == block.gaslimit);
assert(block.number == block.timestamp);
assert(tx.gasprice == msg.value);
assert(tx.origin == msg.sender);
uint x = block.number;
2020-12-16 17:32:34 +00:00
unchecked { x += 2; }
assert(x > block.number);
assert(block.timestamp > 10);
assert(gasleft() > 100);
}
}
2021-01-20 10:22:28 +00:00
// ====
2021-03-31 15:11:54 +00:00
// SMTEngine: all
2021-01-20 10:22:28 +00:00
// SMTIgnoreCex: yes
// ----
// Warning 8417: (93-109): Since the VM version paris, "difficulty" was replaced by "prevrandao", which now returns a random number based on the beacon chain.
2021-03-31 15:11:54 +00:00
// Warning 6328: (46-82): CHC: Assertion violation happens here.
// Warning 6328: (86-128): CHC: Assertion violation happens here.
// Warning 6328: (132-174): CHC: Assertion violation happens here.
// Warning 6328: (178-217): CHC: Assertion violation happens here.
// Warning 6328: (221-253): CHC: Assertion violation happens here.
// Warning 6328: (257-288): CHC: Assertion violation happens here.
// Warning 6328: (341-365): CHC: Assertion violation happens here.
// Warning 6328: (369-397): CHC: Assertion violation happens here.
// Warning 6328: (401-424): CHC: Assertion violation happens here.