Ah yeah, good point.
I was able to get it working with the following:
When I revert OffchainLookup
, I wrap my extraData
as abi.encode(extraData, address(this))
and use buggedCallback.selector
.
On callback, I remove the extra wrapper, and call the normal callback:
function buggedCallback(bytes calldata response, bytes calldata buggedExtraData) external view returns (bytes memory) {
return resolveCallback(response, abi.decode(buggedExtraData, (bytes)));
}