{
    "Function": "_getTWAPTick",
    "File": "src/automators/Automator.sol",
    "Parent Contracts": [
        "lib/openzeppelin-contracts/contracts/access/Ownable.sol",
        "lib/openzeppelin-contracts/contracts/utils/Context.sol",
        "src/utils/Swapper.sol",
        "src/interfaces/IErrors.sol",
        "lib/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol"
    ],
    "High-Level Calls": [
        "IUniswapV3Pool"
    ],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _getTWAPTick(IUniswapV3Pool pool, uint32 twapPeriod) internal view returns (int24, bool) {\n        uint32[] memory secondsAgos = new uint32[](2);\n        secondsAgos[0] = 0; // from (before)\n        secondsAgos[1] = twapPeriod; // from (before)\n\n        // pool observe may fail when there is not enough history available\n        try pool.observe(secondsAgos) returns (int56[] memory tickCumulatives, uint160[] memory) {\n            return (int24((tickCumulatives[0] - tickCumulatives[1]) / int56(uint56(twapPeriod))), true);\n        } catch {\n            return (0, false);\n        }\n    }"
}