solidity/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_rational_v2.sol
2020-03-19 14:42:25 +01:00

13 lines
258 B
Solidity

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