2021-05-14 18:54:46 +00:00
|
|
|
pragma abicoder v1;
|
2020-01-22 14:48:56 +00:00
|
|
|
contract C {
|
|
|
|
function d(bytes memory _data) public pure returns (uint8) {
|
|
|
|
return abi.decode(_data, (uint8));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ====
|
|
|
|
// EVMVersion: >=byzantium
|
|
|
|
// revertStrings: debug
|
|
|
|
// ABIEncoderV1Only: true
|
2022-05-13 16:41:55 +00:00
|
|
|
// compileViaYul: false
|
2020-01-22 14:48:56 +00:00
|
|
|
// ----
|
|
|
|
// 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"
|