{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/cgp/governance/InterchainGovernance.sol",
    "Parent Contracts": [
        "contracts/cgp/interfaces/IInterchainGovernance.sol",
        "contracts/cgp/util/Caller.sol",
        "contracts/cgp/interfaces/ICaller.sol",
        "contracts/gmp-sdk/util/TimeLock.sol",
        "contracts/gmp-sdk/interfaces/ITimeLock.sol",
        "contracts/gmp-sdk/executable/AxelarExecutable.sol",
        "contracts/gmp-sdk/interfaces/IAxelarExecutable.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "keccak256(bytes)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract InterchainGovernance is AxelarExecutable, TimeLock, Caller, IInterchainGovernance {\n    enum GovernanceCommand {\n        ScheduleTimeLockProposal,\n        CancelTimeLockProposal\n    }\n\n    string public governanceChain;\n    string public governanceAddress;\n    bytes32 public immutable governanceChainHash;\n    bytes32 public immutable governanceAddressHash;\n\n    /**\n     * @notice Initializes the contract\n     * @param gateway The address of the Axelar gateway contract\n     * @param governanceChain_ The name of the governance chain\n     * @param governanceAddress_ The address of the governance contract\n     * @param minimumTimeDelay The minimum time delay for timelock operations\n     */\n    constructor(\n        address gateway,\n        string memory governanceChain_,\n        string memory governanceAddress_,\n        uint256 minimumTimeDelay\n    ) AxelarExecutable(gateway) TimeLock(minimumTimeDelay) {\n        governanceChain = governanceChain_;\n        governanceAddress = governanceAddress_;\n        governanceChainHash = keccak256(bytes(governanceChain_));\n        governanceAddressHash = keccak256(bytes(governanceAddress_));\n    }\n\n    /**\n     * @notice Returns the ETA of a proposal\n     * @param target The address of the contract targeted by the proposal\n     * @param callData The call data to be sent to the target contract\n     * @param nativeValue The amount of native tokens to be sent to the target contract\n     * @return uint256 The ETA of the proposal\n     */\n    function getProposalEta(\n        address target,\n        bytes calldata callData,\n        uint256 nativeValue\n    ) external view returns (uint256) {\n        return _getTimeLockEta(_getProposalHash(target, callData, nativeValue));\n    }\n\n    /**\n     * @notice Executes a proposal\n     * @dev The proposal is executed by calling the target contract with calldata. Native value is\n     * transferred with the call to the target contract.\n     * @param target The target address of the contract to call\n     * @param callData The data containing the function and arguments for the contract to call\n     * @param nativeValue The amount of native token to send to the target contract\n     */\n    function executeProposal(\n        address target,\n        bytes calldata callData,\n        uint256 nativeValue\n    ) external payable {\n        bytes32 proposalHash = keccak256(abi.encodePacked(target, callData, nativeValue));\n\n        _finalizeTimeLock(proposalHash);\n        _call(target, callData, nativeValue);\n\n        emit ProposalExecuted(proposalHash, target, callData, nativeValue, block.timestamp);\n    }\n\n    /**\n     * @notice Internal function to execute a proposal action\n     * @param sourceChain The source chain of the proposal, must equal the governance chain\n     * @param sourceAddress The source address of the proposal, must equal the governance address\n     * @param payload The payload of the proposal\n     */\n    function _execute(\n        string calldata sourceChain,\n        string calldata sourceAddress,\n        bytes calldata payload\n    ) internal override {\n        if (keccak256(bytes(sourceChain)) != governanceChainHash || keccak256(bytes(sourceAddress)) != governanceAddressHash)\n            revert NotGovernance();\n\n        (uint256 command, address target, bytes memory callData, uint256 nativeValue, uint256 eta) = abi.decode(\n            payload,\n            (uint256, address, bytes, uint256, uint256)\n        );\n\n        if (target == address(0)) revert InvalidTarget();\n\n        _processCommand(command, target, callData, nativeValue, eta);\n    }\n\n    /**\n     * @notice Internal function to process a governance command\n     * @param commandId The id of the command, 0 for proposal creation and 1 for proposal cancellation\n     * @param target The target address the proposal will call\n     * @param callData The data the encodes the function and arguments to call on the target contract\n     * @param nativeValue The nativeValue of native token to be sent to the target contract\n     * @param eta The time after which the proposal can be executed\n     */\n    function _processCommand(\n        uint256 commandId,\n        address target,\n        bytes memory callData,\n        uint256 nativeValue,\n        uint256 eta\n    ) internal virtual {\n        if (commandId > uint256(type(GovernanceCommand).max)) {\n            revert InvalidCommand();\n        }\n\n        GovernanceCommand command = GovernanceCommand(commandId);\n        bytes32 proposalHash = _getProposalHash(target, callData, nativeValue);\n\n        if (command == GovernanceCommand.ScheduleTimeLockProposal) {\n            eta = _scheduleTimeLock(proposalHash, eta);\n\n            emit ProposalScheduled(proposalHash, target, callData, nativeValue, eta);\n            return;\n        } else if (command == GovernanceCommand.CancelTimeLockProposal) {\n            _cancelTimeLock(proposalHash);\n\n            emit ProposalCancelled(proposalHash, target, callData, nativeValue, eta);\n            return;\n        }\n    }\n\n    /**\n     * @dev Get proposal hash using the target, callData, and nativeValue\n     */\n    function _getProposalHash(\n        address target,\n        bytes memory callData,\n        uint256 nativeValue\n    ) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(target, callData, nativeValue));\n    }\n\n    /**\n     * @notice Overrides internal function of AxelarExecutable, will always revert\n     * as this governance module does not support execute with token.\n     */\n    function _executeWithToken(\n        string calldata, /* sourceChain */\n        string calldata, /* sourceAddress */\n        bytes calldata, /* payload */\n        string calldata, /* tokenSymbol */\n        uint256 /* amount */\n    ) internal pure override {\n        revert TokenNotSupported();\n    }\n\n    /**\n     * @notice Making contact able to receive native value\n     */\n    receive() external payable {}\n}"
}