mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			532 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			532 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| interface HelloWorld {
 | |
|     function hello() external pure;
 | |
|     function world(int) external pure;
 | |
| }
 | |
| 
 | |
| interface HelloWorldWithEvent {
 | |
|     event Event();
 | |
|     function hello() external pure;
 | |
|     function world(int) external pure;
 | |
| }
 | |
| 
 | |
| contract Test {
 | |
|     bytes4 public hello_world = type(HelloWorld).interfaceId;
 | |
|     bytes4 public hello_world_with_event = type(HelloWorldWithEvent).interfaceId;
 | |
| }
 | |
| 
 | |
| // ====
 | |
| // compileViaYul: also
 | |
| // ----
 | |
| // hello_world()              -> left(0xc6be8b58)
 | |
| // hello_world_with_event()   -> left(0xc6be8b58)
 |