{
    "Function": "_executeProposal",
    "File": "src/core/Governance/TemporalGovernor.sol",
    "Parent Contracts": [
        "lib/openzeppelin-contracts/contracts/security/Pausable.sol",
        "lib/openzeppelin-contracts/contracts/access/Ownable.sol",
        "lib/openzeppelin-contracts/contracts/utils/Context.sol",
        "src/core/Governance/ITemporalGovernor.sol"
    ],
    "High-Level Calls": [
        "EnumerableSet",
        "IWormhole",
        "SafeCast"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "_sanityCheckPayload",
        "abi.decode()",
        "require(bool,string)",
        "require(bool,string)",
        "require(bool,string)",
        "require(bool,string)",
        "require(bool,string)"
    ],
    "Library Calls": [
        "toUint248",
        "contains"
    ],
    "Low-Level Calls": [
        "call"
    ],
    "Code": "function _executeProposal(bytes memory VAA, bool overrideDelay) private {\n        // This call accepts single VAAs and headless VAAs\n        (\n            IWormhole.VM memory vm,\n            bool valid,\n            string memory reason\n        ) = wormholeBridge.parseAndVerifyVM(VAA);\n\n        require(valid, reason); /// ensure VAA parsing verification succeeded\n\n        if (!overrideDelay) {\n            require(\n                queuedTransactions[vm.hash].queueTime != 0,\n                \"TemporalGovernor: tx not queued\"\n            );\n            require(\n                queuedTransactions[vm.hash].queueTime + proposalDelay <=\n                    block.timestamp,\n                \"TemporalGovernor: timelock not finished\"\n            );\n        } else if (queuedTransactions[vm.hash].queueTime == 0) {\n            /// if queue time is 0 due to fast track execution, set it to current block timestamp\n            queuedTransactions[vm.hash].queueTime = block.timestamp.toUint248();\n        }\n\n        // Ensure the emitterAddress of this VAA is a trusted address\n        require(\n            trustedSenders[vm.emitterChainId].contains(vm.emitterAddress), /// allow multiple per chainid\n            \"TemporalGovernor: Invalid Emitter Address\"\n        );\n\n        require(\n            !queuedTransactions[vm.hash].executed,\n            \"TemporalGovernor: tx already executed\"\n        );\n\n        queuedTransactions[vm.hash].executed = true;\n\n        address[] memory targets; /// contracts to call\n        uint256[] memory values; /// native token amount to send\n        bytes[] memory calldatas; /// calldata to send\n        (, targets, values, calldatas) = abi.decode(\n            vm.payload,\n            (address, address[], uint256[], bytes[])\n        );\n\n        /// Interaction (s)\n\n        _sanityCheckPayload(targets, values, calldatas);\n\n        for (uint256 i = 0; i < targets.length; i++) {\n            address target = targets[i];\n            uint256 value = values[i];\n            bytes memory data = calldatas[i];\n\n            // Go make our call, and if it is not successful revert with the error bubbling up\n            (bool success, bytes memory returnData) = target.call{value: value}(\n                data\n            );\n\n            /// revert on failure with error message if any\n            require(success, string(returnData));\n\n            emit ExecutedTransaction(target, value, data);\n        }\n    }"
}