solidity/test/libsolidity/semanticTests/revertStrings/invalid_abi_decoding_calldata_v1.sol
Alex Beregszaszi 299873182b Cleanup ABICoder V1 tests
Include the pragma explicitly, rename the file to have a _v1 suffix, and also add V2 counterparts where missing.
2021-05-17 12:37:10 +01:00

15 lines
687 B
Solidity

pragma abicoder v1;
contract C {
function d(bytes memory _data) public pure returns (uint8) {
return abi.decode(_data, (uint8));
}
}
// ====
// EVMVersion: >=byzantium
// revertStrings: debug
// ABIEncoderV1Only: true
// ----
// d(bytes): 0x20, 0x20, 0x0000000000000000000000000000000000000000000000000000000000000000 -> 0
// d(bytes): 0x100, 0x20, 0x0000000000000000000000000000000000000000000000000000000000000000 -> FAILURE, hex"08c379a0", 0x20, 43, "ABI calldata decoding: invalid h", "ead pointer"
// d(bytes): 0x20, 0x100, 0x0000000000000000000000000000000000000000000000000000000000000000 -> FAILURE, hex"08c379a0", 0x20, 43, "ABI calldata decoding: invalid d", "ata pointer"