mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			397 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			397 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
contract c {
 | 
						|
    function set() public returns (bool) {
 | 
						|
        data = msg.data;
 | 
						|
        return true;
 | 
						|
    }
 | 
						|
 | 
						|
    function getLength() public returns (uint256) {
 | 
						|
        return data.length;
 | 
						|
    }
 | 
						|
 | 
						|
    bytes data;
 | 
						|
}
 | 
						|
// ====
 | 
						|
// compileViaYul: also
 | 
						|
// ----
 | 
						|
// getLength() -> 0
 | 
						|
// set(): 1, 2 -> true
 | 
						|
// gas irOptimized: 102993
 | 
						|
// gas legacy: 103126
 | 
						|
// gas legacyOptimized: 102967
 | 
						|
// getLength() -> 68
 |