function checkLog(
AutomationLog calldata log,
bytes memory
)
external
view
returns (bool upkeepNeeded, bytes memory performData)
{
address caller = bytes32ToAddress(log.topics\[1]);
uint128 requestId = uint128(uint256(log.topics\[2]));
UsdTokenSwapKeeperStorage storage self = _getUsdTokenSwapKeeperStorage();
UsdTokenSwapConfig.SwapRequest memory request =
IMarketMakingEngine(self.marketMakingEngine).getSwapRequest(caller, requestId);
@> if (request.deadline < block.timestamp) {
return (false, new bytes(0));
}
if (request.assetOut != self.asset) {
return (false, new bytes(0));
}
string[] memory streams = new string[](1);
streams[0] = self.streamId;
bytes memory extraData = abi.encode(caller, requestId);
revert StreamsLookup(DATA_STREAMS_FEED_LABEL, streams, DATA_STREAMS_QUERY_LABEL, block.timestamp, extraData);
}