abstract contract OZGovernorVoter is CoreRef {

    // Events
    event Proposed(IOZGovernor indexed governor, uint256 proposalId);
    event Voted(IOZGovernor indexed governor, uint256 proposalId, uint256 weight, uint8 support);

    /// @notice propose a new proposal on the target governor.
    function propose(
        IOZGovernor governor,
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        string memory description
    ) external onlyTribeRole(TribeRoles.METAGOVERNANCE_VOTE_ADMIN) returns (uint256) {
        uint256 proposalId = governor.propose(targets, values, calldatas, description);
        emit Proposed(governor, proposalId);
        return proposalId;
    }

    /// @notice cast a vote on a given proposal on the target governor.
    function castVote(
        IOZGovernor governor,
        uint256 proposalId,
        uint8 support
    ) external onlyTribeRole(TribeRoles.METAGOVERNANCE_VOTE_ADMIN) returns (uint256) {
        uint256 weight = governor.castVote(proposalId, support);
        emit Voted(governor, proposalId, weight, support);
        return weight;
    }
}
/// @title Abstract class to interact with an OZ governor.
/// @author Fei Protocol
function castVote(
    IOZGovernor governor,
    uint256 proposalId,
    uint8 support
) external onlyTribeRole(TribeRoles.METAGOVERNANCE_VOTE_ADMIN) returns (uint256) {
    uint256 weight = governor.castVote(proposalId, support);
    emit Voted(governor, proposalId, weight, support);
    return weight;
}

/// @notice cast a vote on a given proposal on the target governor.