pragma solidity ^0.8.13;
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
library LowLevelCallUtils {
using Address for address;
* Makes a static call to the specified `target` with `data`. Return data can be fetched with
* `returnDataSize` and `readReturnData`.
* target The address to staticcall.
* data The data to pass to the call.
* success True if the call succeeded, or false if it reverts.
function functionStaticCall(
address target,
bytes memory data
) internal view returns (bool success) {
return functionStaticCall(target, data, gasleft());
}
* Makes a static call to the specified `target` with `data` using `gasLimit`. Return data can be fetched with
* `returnDataSize` and `readReturnData`.
* target The address to staticcall.
* data The data to pass to the call.
* gasLimit The gas limit to use for the call.
* success True if the call succeeded, or false if it reverts.
function functionStaticCall(
address target,