mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			450 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			450 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| contract Main {
 | |
|     bytes3 name;
 | |
|     bool flag;
 | |
| 
 | |
|     constructor(bytes3 x, bool f) {
 | |
|         name = x;
 | |
|         flag = f;
 | |
|     }
 | |
| 
 | |
|     function getName() public returns (bytes3 ret) {
 | |
|         return name;
 | |
|     }
 | |
| 
 | |
|     function getFlag() public returns (bool ret) {
 | |
|         return flag;
 | |
|     }
 | |
| }
 | |
| // ----
 | |
| // constructor(): "abc", true
 | |
| // gas irOptimized: 106546
 | |
| // gas legacy: 145838
 | |
| // gas legacyOptimized: 104017
 | |
| // getFlag() -> true
 | |
| // getName() -> "abc"
 |