solidity/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_rational.sol
2022-05-19 20:23:28 +02:00

12 lines
254 B
Solidity

// Tests that rational numbers (even negative ones) are encoded properly.
contract C {
function f() public pure returns (bytes memory) {
return abi.encode(1, -2);
}
}
// ====
// compileToEwasm: also
// ----
// f() -> 0x20, 0x40, 0x1, -2