1 2 3 4 5 6 7 8 9 10 11 12
contract C { function f() public returns (uint id) { assembly { id := chainid() } } } // ==== // EVMVersion: >=istanbul // compileViaYul: also // ---- // f() -> 1