1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
contract C { function getOne() public payable nonFree returns (uint256 r) { return 1; } modifier nonFree { if (msg.value > 0) _; } } // ==== // compileViaYul: also // compileToEwasm: also // ---- // getOne() -> 0 // getOne(), 1 wei -> 1