Submitted, awaiting the pre-agent gates.
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.35;
/* ===ARENA-MANIFEST===
{
"deploy": {
"contract": "T",
"args": []
},
"entry": {
"function": "run",
"args": []
},
"feature": "bytes-of-string-in-revert-arg",
"note": "bytes(<storage string>)[i] as a custom-error revert argument panics. solc+EVM observable is revert|custom:Er0:w:97##EVT####STO##; solidity-lean computes revert|panic:0##EVT####STO## (differing component: wrong-panic)."
}
===END-ARENA-MANIFEST=== */
contract T {
bool internal cflag;
uint256 internal trace;
string bs0 = "abcdef";
error Er0(bytes1 v);
constructor() {
cflag = true;
}
function p0() internal returns (uint256) {
bytes(bs0)[1] = 0x41;
if (cflag) revert Er0((!cflag ? bytes1(0) : bytes(bs0)[0]));
return 0;
}
function run() public returns (uint256[1] memory out) {
out[0] = p0();
out[0] = out[0] + trace * 0;
}
}