2020-04-08 22:08:49 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ====
|
2020-11-21 13:54:16 +00:00
|
|
|
// compileToEwasm: also
|
2021-03-12 23:02:36 +00:00
|
|
|
// compileViaYul: also
|
2020-04-08 22:08:49 +00:00
|
|
|
// ----
|
2020-11-21 13:54:16 +00:00
|
|
|
// hello_world() -> left(0xc6be8b58)
|
|
|
|
// hello_world_with_event() -> left(0xc6be8b58)
|