mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			71 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| contract C {
 | |
| 	bytes32 bhash;
 | |
| 	address coin;
 | |
| 	uint dif;
 | |
| 	uint prevrandao;
 | |
| 	uint glimit;
 | |
| 	uint number;
 | |
| 	uint tstamp;
 | |
| 	bytes mdata;
 | |
| 	address sender;
 | |
| 	bytes4 sig;
 | |
| 	uint value;
 | |
| 	uint gprice;
 | |
| 	address origin;
 | |
| 
 | |
| 	function f() public payable {
 | |
| 		bhash = blockhash(12);
 | |
| 		coin = block.coinbase;
 | |
| 		dif = block.difficulty;
 | |
| 		prevrandao = block.prevrandao;
 | |
| 		glimit = block.gaslimit;
 | |
| 		number = block.number;
 | |
| 		tstamp = block.timestamp;
 | |
| 		mdata = msg.data;
 | |
| 		sender = msg.sender;
 | |
| 		sig = msg.sig;
 | |
| 		value = msg.value;
 | |
| 		gprice = tx.gasprice;
 | |
| 		origin = tx.origin;
 | |
| 
 | |
| 		fi();
 | |
| 
 | |
| 		assert(bhash == blockhash(12));
 | |
| 		assert(coin == block.coinbase);
 | |
| 		assert(dif == block.difficulty);
 | |
| 		assert(prevrandao == block.prevrandao);
 | |
| 		assert(glimit == block.gaslimit);
 | |
| 		assert(number == block.number);
 | |
| 		assert(tstamp == block.timestamp);
 | |
| 		assert(mdata.length == msg.data.length);
 | |
| 		assert(sender == msg.sender);
 | |
| 		assert(sig == msg.sig);
 | |
| 		assert(value == msg.value);
 | |
| 		assert(gprice == tx.gasprice);
 | |
| 		assert(origin == tx.origin);
 | |
| 	}
 | |
| 
 | |
| 	function fi() internal view {
 | |
| 		assert(bhash == blockhash(12));
 | |
| 		assert(coin == block.coinbase);
 | |
| 		assert(dif == block.difficulty);
 | |
| 		assert(prevrandao == block.prevrandao);
 | |
| 		assert(glimit == block.gaslimit);
 | |
| 		assert(number == block.number);
 | |
| 		assert(tstamp == block.timestamp);
 | |
| 		assert(mdata.length == msg.data.length);
 | |
| 		assert(sender == msg.sender);
 | |
| 		assert(sig == msg.sig);
 | |
| 		assert(value == msg.value);
 | |
| 		assert(gprice == tx.gasprice);
 | |
| 		assert(origin == tx.origin);
 | |
| 	}
 | |
| }
 | |
| // ====
 | |
| // SMTEngine: all
 | |
| // ----
 | |
| // Warning 8417: (293-309): Since the VM version paris, "difficulty" was replaced by "prevrandao", which now returns a random number based on the beacon chain.
 | |
| // Warning 8417: (645-661): Since the VM version paris, "difficulty" was replaced by "prevrandao", which now returns a random number based on the beacon chain.
 | |
| // Warning 8417: (1127-1143): Since the VM version paris, "difficulty" was replaced by "prevrandao", which now returns a random number based on the beacon chain.
 | |
| // Info 1391: CHC: 26 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
 |