I wanted to know if there are any attack vector a malicious actor could use to potentially exploit or attack an impl contract with the delegatecall function below:
function multicall(bytes[] calldata data) external returns (bytes[] memory results) {
results = new bytes[](data.length);
for (uint256 i = 0; i < data.length; i++) {
// this is an optimized a bit multicall w/o using of Address library (it safes a lot of bytecode)
results[i] = _fastDelegateCall(data[i]);
}
return results;
}
function _fastDelegateCall(bytes memory data) private returns (bytes memory _result) {
(bool success, bytes memory returnData) = address(this).delegatecall(data);
if (success) {
return returnData;
}
if (returnData.length > 0) {
assembly {
revert(add(32, returnData), mload(returnData))
}
} else {
revert();
}
function multicall() is a public function, I was wondering if it could be abused by a malicious actor?