solidity/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_rational.sol
2023-05-11 10:56:55 -05:00

9 lines
221 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);
}
}
// ----
// f() -> 0x20, 0x40, 0x1, -2